Imports
/-
Copyright (c) 2025 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
module
public import Physlib.Particles.SuperSymmetry.SU5.ChargeSpectrum.MinimallyAllowsTerm.OfFinset
public import Physlib.StringTheory.FTheory.SU5.Fluxes.NoExotics.CompletenessQuanta of 5-d representations
i. Overview
The 5-bar representations of the SU(5)ΓU(1) carry
the quantum numbers of their U(1) charges and their fluxes.
In this module we define the data structure for these quanta and properties thereof.
ii. Key results
FiveQuanta is the type of quanta of 5-bar representations.
FiveQuanta.toFluxesFive is the underlying FluxesFive of a FiveQuanta.
FiveQuanta.toCharges is the underlying Multiset charges of a FiveQuanta.
FiveQuanta.reduce is the reduction of a FiveQuanta which adds together
all the fluxes corresponding to the same charge (i.e. representation).
FiveQuanta.liftCharges given a charge c the FiveQuanta which have
charge c and no exotics or zero fluxes.
FiveQuanta.anomalyCoefficient is the anomaly coefficient associated with a FiveQuanta.
iii. Table of contents
A. The definition of FiveQuanta
A.1. The map to underlying fluxes
A.2. The map to underlying charges
A.3. The map from charges to fluxes
B. The reduction of a FiveQuanta
B.1. The reduced FiveQuanta has no duplicate elements
B.2. The underlying charges of the reduced FiveQuanta are the deduped charges
B.3. Membership condition on the reduced FiveQuanta
B.4. Filter of the reduced FiveQuanta by a charge
B.5. The reduction is idempotent
B.6. Preservation of certain sums under reduction
B.7. Reduction does nothing if no duplicate charges
B.8. The charge map is preserved by reduction
B.9. A fluxes in the reduced FiveQuanta is a sum of fluxes in the original FiveQuanta
B.10. No exotics condition on the reduced FiveQuanta
B.10.1. Number of chiral L
B.10.2. Number of anti-chiral L
B.10.3. Number of chiral D
B.10.4. Number of anti-chiral D
B.10.5. The NoExotics condition on the reduced FiveQuanta
B.11. Reduce member of FluxesFive.elemsNoExotics
C. Decomposition of a FiveQuanta into basic fluxes
C.1. Decomposition of fluxes
C.2. Decomposition of a FiveQuanta (with no exotics)
C.2.1. Decomposition distributes over addition
C.2.2. Decomposition commutes with filtering charges
C.2.3. Decomposition preserves the charge map
C.2.4. Decomposition preserves the charges
C.2.5. Decomposition preserves the reduction
C.2.6. Fluxes of the decomposition of a FiveQuanta
D. Lifting charges to FiveQuanta
D.1. liftCharge c: multiset of five-quanta for a finite set of charges c with no exotics
D.2. FiveQuanta in liftCharge c have a finite set of charges c
D.3. FiveQuanta in liftCharge c have no duplicate charges
D.4. Membership in liftCharge c iff is reduction of FiveQuanta with given fluxes
D.5. FiveQuanta in liftCharge c do not have zero fluxes
D.6. FiveQuanta in liftCharge c have no exotics
D.7. Membership in liftCharge c iff have no exotics, no zero fluxes, and charges c
D.8. liftCharge c is preserved under a map if reduced
E. Anomaly cancellation coefficients
E.1. Anomaly coefficients of a FiveQuanta
E.2. Anomaly coefficients under a map
E.3. Anomaly coefficients is preserved under reduce
iv. References
A reference for the anomaly cancellation conditions is arXiv:1401.5084.
@[expose] public section
A. The definition of FiveQuanta
The quanta of 5-bar representations corresponding to a multiset of
(q, M, N) for each particle. (M, N) are defined in the FluxesFive module.
abbrev FiveQuanta (π© : Type := β€) : Type := Multiset (π© Γ Fluxes)A.1. The map to underlying fluxes
The underlying FluxesFive from a FiveQuanta.
def toFluxesFive (x : FiveQuanta π©) : FluxesFive := x.map Prod.sndA.2. The map to underlying charges
The underlying Multiset charges from a FiveQuanta.
def toCharges (x : FiveQuanta π©) : Multiset π© := x.map Prod.fstA.3. The map from charges to fluxes
The map which takes a charge to the overall flux it
corresponds to in a FiveQuanta.
def toChargeMap [DecidableEq π©] (x : FiveQuanta π©) : π© β Fluxes :=
fun z => ((x.filter fun p => p.1 = z).map Prod.snd).sumπ©:Typeinstβ:DecidableEq π©x:FiveQuanta π©z:π©h:z β x.toChargeshl:Multiset.filter (fun p => p.1 = z) x = 0β’ x.toChargeMap z = 0
simp [toChargeMap, hl] All goals completed! π
B. The reduction of a FiveQuanta
The reduce of FiveQuanta is a new FiveQuanta with all the fluxes
corresponding to the same charge (i.e. representation) added together.
def reduce (x : FiveQuanta π©) : FiveQuanta π© :=
x.toCharges.dedup.map fun q5 => (q5, ((x.filter (fun f => f.1 = q5)).map (fun y => y.2)).sum)
B.1. The reduced FiveQuanta has no duplicate elements
lemma reduce_nodup (x : FiveQuanta π©) : x.reduce.Nodup := by π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©β’ Multiset.Nodup x.reduce
rw [reduce π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©β’ (Multiset.map (fun q5 => (q5, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum))
x.toCharges.dedup).Nodup π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©β’ (Multiset.map (fun q5 => (q5, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum))
x.toCharges.dedup).Nodup] π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©β’ (Multiset.map (fun q5 => (q5, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum))
x.toCharges.dedup).Nodup
exact Multiset.Nodup.map (fun _ _ h => congrArg Prod.fst h) (Multiset.nodup_dedup x.toCharges) All goals completed! π@[simp]
lemma reduce_dedup (x : FiveQuanta π©) : x.reduce.dedup = x.reduce :=
Multiset.Nodup.dedup x.reduce_nodup
B.2. The underlying charges of the reduced FiveQuanta are the deduped charges
lemma reduce_toCharges (x : FiveQuanta π©) : x.reduce.toCharges = x.toCharges.dedup := by π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©β’ x.reduce.toCharges = x.toCharges.dedup
simp [reduce, toCharges] All goals completed! π
B.3. Membership condition on the reduced FiveQuanta
lemma mem_reduce_iff (x : FiveQuanta π©) (p : π© Γ Fluxes) :
p β x.reduce β p.1 β x.toCharges β§
p.2 = ((x.filter (fun f => f.1 = p.1)).map (fun y => y.2)).sum := by π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©p:π© Γ Fluxesβ’ p β x.reduce β p.1 β x.toCharges β§ p.2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x)).sum
simp [reduce] π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©p:π© Γ Fluxesβ’ (β a β x.toCharges, (a, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = a) x)).sum) = p) β
p.1 β x.toCharges β§ p.2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x)).sum
aesop All goals completed! π
B.4. Filter of the reduced FiveQuanta by a charge
lemma reduce_filter (x : FiveQuanta π©) (q : π©) (h : q β x.toCharges) :
x.reduce.filter (fun f => f.1 = q) =
{(q, ((x.filter (fun f => f.1 = q)).map (fun y => y.2)).sum)} := by π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ Multiset.filter (fun f => f.1 = q) x.reduce =
{(q, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q) x)).sum)}
simp [reduce, Multiset.filter_map, Function.comp, Multiset.filter_eq', h] All goals completed! πB.5. The reduction is idempotent
@[simp]
lemma reduce_reduce (x : FiveQuanta π©) :
x.reduce.reduce = x.reduce := by π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©β’ x.reduce.reduce = x.reduce
refine Multiset.Nodup.toFinset_inj (reduce_nodup x.reduce) (reduce_nodup x) ?_ π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©β’ Multiset.toFinset x.reduce.reduce = Multiset.toFinset x.reduce
ext p π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©p:π© Γ Fluxesβ’ p β Multiset.toFinset x.reduce.reduce β p β Multiset.toFinset x.reduce
simp only [Multiset.mem_toFinset] π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©p:π© Γ Fluxesβ’ p β x.reduce.reduce β p β x.reduce
rw [mem_reduce_iff, π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©p:π© Γ Fluxesβ’ p.1 β x.reduce.toCharges β§ p.2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x.reduce)).sum β
p β x.reduce π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©p:π© Γ Fluxesβ’ p.1 β x.toCharges.dedup β§ p.2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x.reduce)).sum β
p.1 β x.toCharges β§ p.2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x)).sum reduce_toCharges, π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©p:π© Γ Fluxesβ’ p.1 β x.toCharges.dedup β§ p.2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x.reduce)).sum β
p β x.reduce π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©p:π© Γ Fluxesβ’ p.1 β x.toCharges.dedup β§ p.2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x.reduce)).sum β
p.1 β x.toCharges β§ p.2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x)).sum mem_reduce_iff π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©p:π© Γ Fluxesβ’ p.1 β x.toCharges.dedup β§ p.2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x.reduce)).sum β
p.1 β x.toCharges β§ p.2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x)).sum π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©p:π© Γ Fluxesβ’ p.1 β x.toCharges.dedup β§ p.2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x.reduce)).sum β
p.1 β x.toCharges β§ p.2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x)).sum] π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©p:π© Γ Fluxesβ’ p.1 β x.toCharges.dedup β§ p.2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x.reduce)).sum β
p.1 β x.toCharges β§ p.2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x)).sum
simp only [Multiset.mem_dedup, and_congr_right_iff] π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©p:π© Γ Fluxesβ’ p.1 β x.toCharges β
(p.2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x.reduce)).sum β
p.2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x)).sum)
intro hp π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©p:π© Γ Fluxeshp:p.1 β x.toChargesβ’ p.2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x.reduce)).sum β
p.2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x)).sum
rw [reduce_filter x p.1 hp π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©p:π© Γ Fluxeshp:p.1 β x.toChargesβ’ p.2 =
(Multiset.map (fun y => y.2)
{(p.1, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x)).sum)}).sum β
p.2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x)).sum π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©p:π© Γ Fluxeshp:p.1 β x.toChargesβ’ p.2 =
(Multiset.map (fun y => y.2)
{(p.1, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x)).sum)}).sum β
p.2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x)).sum] π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©p:π© Γ Fluxeshp:p.1 β x.toChargesβ’ p.2 =
(Multiset.map (fun y => y.2)
{(p.1, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x)).sum)}).sum β
p.2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x)).sum
simp All goals completed! πB.6. Preservation of certain sums under reduction
lemma reduce_sum_eq_sum_toCharges {M} [AddCommMonoid M] (x : FiveQuanta π©) (f : π© β Fluxes β+ M) :
(x.reduce.map fun (q5, x) => f q5 x).sum = (x.map fun (q5, x) => f q5 x).sum := by π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ (Multiset.map
(fun x =>
match x with
| (q5, x) => (f q5) x)
x.reduce).sum =
(Multiset.map
(fun x =>
match x with
| (q5, x) => (f q5) x)
x).sum
calc _
_ = β q5 β x.toCharges.toFinset,
f q5 ((x.filter (fun f => f.1 = q5)).map (fun y => y.2)).sum := by π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ (Multiset.map
(fun x =>
match x with
| (q5, x) => (f q5) x)
x.reduce).sum =
β q5 β x.toCharges.toFinset, (f q5) (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum
rw [reduce π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ (Multiset.map
(fun x =>
match x with
| (q5, x) => (f q5) x)
(Multiset.map (fun q5 => (q5, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum))
x.toCharges.dedup)).sum =
β q5 β x.toCharges.toFinset, (f q5) (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ (Multiset.map
(fun x =>
match x with
| (q5, x) => (f q5) x)
(Multiset.map (fun q5 => (q5, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum))
x.toCharges.dedup)).sum =
β q5 β x.toCharges.toFinset, (f q5) (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum] π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ (Multiset.map
(fun x =>
match x with
| (q5, x) => (f q5) x)
(Multiset.map (fun q5 => (q5, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum))
x.toCharges.dedup)).sum =
β q5 β x.toCharges.toFinset, (f q5) (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum
simp [Finset.sum] All goals completed! π
_ = β q5 β x.toCharges.toFinset,
(((x.filter (fun f => f.1 = q5)).map (fun y => f q5 y.2))).sum := by π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ β q5 β x.toCharges.toFinset, (f q5) (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum =
β q5 β x.toCharges.toFinset, (Multiset.map (fun y => (f q5) y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum
congr e_f π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ (fun q5 => (f q5) (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum) = fun q5 =>
(Multiset.map (fun y => (f q5) y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum
funext q5 e_f π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mq5:π©β’ (f q5) (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum =
(Multiset.map (fun y => (f q5) y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum
rw [AddMonoidHom.map_multiset_sum, e_f π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mq5:π©β’ (Multiset.map (β(f q5)) (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x))).sum =
(Multiset.map (fun y => (f q5) y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum e_f π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mq5:π©β’ (Multiset.map (β(f q5) β fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum =
(Multiset.map (fun y => (f q5) y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum Multiset.map_map e_f π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mq5:π©β’ (Multiset.map (β(f q5) β fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum =
(Multiset.map (fun y => (f q5) y.2) (Multiset.filter (fun f => f.1 = q5) x)).sume_f π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mq5:π©β’ (Multiset.map (β(f q5) β fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum =
(Multiset.map (fun y => (f q5) y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum]e_f π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mq5:π©β’ (Multiset.map (β(f q5) β fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum =
(Multiset.map (fun y => (f q5) y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum
rfl All goals completed! π
_ = (x.toCharges.dedup.bind fun q5 =>
((x.filter (fun f => f.1 = q5)).map (fun y => f q5 y.2))).sum := by π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ β q5 β x.toCharges.toFinset, (Multiset.map (fun y => (f q5) y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum =
(x.toCharges.dedup.bind fun q5 => Multiset.map (fun y => (f q5) y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum
rw [Multiset.sum_bind π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ β q5 β x.toCharges.toFinset, (Multiset.map (fun y => (f q5) y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum =
(Multiset.map (fun a => (Multiset.map (fun y => (f a) y.2) (Multiset.filter (fun f => f.1 = a) x)).sum)
x.toCharges.dedup).sum π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ β q5 β x.toCharges.toFinset, (Multiset.map (fun y => (f q5) y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum =
(Multiset.map (fun a => (Multiset.map (fun y => (f a) y.2) (Multiset.filter (fun f => f.1 = a) x)).sum)
x.toCharges.dedup).sum] π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ β q5 β x.toCharges.toFinset, (Multiset.map (fun y => (f q5) y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum =
(Multiset.map (fun a => (Multiset.map (fun y => (f a) y.2) (Multiset.filter (fun f => f.1 = a) x)).sum)
x.toCharges.dedup).sum
simp [Finset.sum] All goals completed! π
_ = (((x.toCharges.dedup.bind fun q5 =>
((x.filter (fun f => f.1 = q5)))).map (fun y => f y.1 y.2))).sum := by π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ (x.toCharges.dedup.bind fun q5 => Multiset.map (fun y => (f q5) y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum =
(Multiset.map (fun y => (f y.1) y.2) (x.toCharges.dedup.bind fun q5 => Multiset.filter (fun f => f.1 = q5) x)).sum
congr π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ (x.toCharges.dedup.bind fun q5 => Multiset.map (fun y => (f q5) y.2) (Multiset.filter (fun f => f.1 = q5) x)) =
Multiset.map (fun y => (f y.1) y.2) (x.toCharges.dedup.bind fun q5 => Multiset.filter (fun f => f.1 = q5) x)
rw [Multiset.map_bind π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ (x.toCharges.dedup.bind fun q5 => Multiset.map (fun y => (f q5) y.2) (Multiset.filter (fun f => f.1 = q5) x)) =
x.toCharges.dedup.bind fun a => Multiset.map (fun y => (f y.1) y.2) (Multiset.filter (fun f => f.1 = a) x) π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ (x.toCharges.dedup.bind fun q5 => Multiset.map (fun y => (f q5) y.2) (Multiset.filter (fun f => f.1 = q5) x)) =
x.toCharges.dedup.bind fun a => Multiset.map (fun y => (f y.1) y.2) (Multiset.filter (fun f => f.1 = a) x)] π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ (x.toCharges.dedup.bind fun q5 => Multiset.map (fun y => (f q5) y.2) (Multiset.filter (fun f => f.1 = q5) x)) =
x.toCharges.dedup.bind fun a => Multiset.map (fun y => (f y.1) y.2) (Multiset.filter (fun f => f.1 = a) x)
congr e_f π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ (fun q5 => Multiset.map (fun y => (f q5) y.2) (Multiset.filter (fun f => f.1 = q5) x)) = fun a =>
Multiset.map (fun y => (f y.1) y.2) (Multiset.filter (fun f => f.1 = a) x)
funext q5 e_f π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mq5:π©β’ Multiset.map (fun y => (f q5) y.2) (Multiset.filter (fun f => f.1 = q5) x) =
Multiset.map (fun y => (f y.1) y.2) (Multiset.filter (fun f => f.1 = q5) x)
refine Multiset.map_congr rfl ?_ e_f π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mq5:π©β’ β x_1 β Multiset.filter (fun f => f.1 = q5) x, (f q5) x_1.2 = (f x_1.1) x_1.2
intro y hy e_f π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mq5:π©y:π© Γ Fluxeshy:y β Multiset.filter (fun f => f.1 = q5) xβ’ (f q5) y.2 = (f y.1) y.2
simp at hy e_f π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mq5:π©y:π© Γ Fluxeshy:y β x β§ y.1 = q5β’ (f q5) y.2 = (f y.1) y.2
rw [hy.2 e_f π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mq5:π©y:π© Γ Fluxeshy:y β x β§ y.1 = q5β’ (f q5) y.2 = (f q5) y.2 All goals completed! π] All goals completed! π
_ = ((x.map (fun y => f y.1 y.2))).sum := by π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ (Multiset.map (fun y => (f y.1) y.2) (x.toCharges.dedup.bind fun q5 => Multiset.filter (fun f => f.1 = q5) x)).sum =
(Multiset.map (fun y => (f y.1) y.2) x).sum
congr e_s π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ (x.toCharges.dedup.bind fun q5 => Multiset.filter (fun f => f.1 = q5) x) = x
apply Multiset.ext.mpr e_s π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ β (a : π© Γ Fluxes),
Multiset.count a (x.toCharges.dedup.bind fun q5 => Multiset.filter (fun f => f.1 = q5) x) = Multiset.count a x
intro p e_s π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesβ’ Multiset.count p (x.toCharges.dedup.bind fun q5 => Multiset.filter (fun f => f.1 = q5) x) = Multiset.count p x
trans ((x.map Prod.fst).dedup.map (fun y => if p.1 = y then x.count p else 0)).sum π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesβ’ Multiset.count p (x.toCharges.dedup.bind fun q5 => Multiset.filter (fun f => f.1 = q5) x) =
(Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup).sumπ©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesβ’ (Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup).sum =
Multiset.count p x
Β· π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesβ’ Multiset.count p (x.toCharges.dedup.bind fun q5 => Multiset.filter (fun f => f.1 = q5) x) =
(Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup).sum rw [@Multiset.count_bind π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesβ’ (Multiset.map (fun b => Multiset.count p (Multiset.filter (fun f => f.1 = b) x)) x.toCharges.dedup).sum =
(Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup).sum π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesβ’ (Multiset.map (fun b => Multiset.count p (Multiset.filter (fun f => f.1 = b) x)) x.toCharges.dedup).sum =
(Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup).sum] π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesβ’ (Multiset.map (fun b => Multiset.count p (Multiset.filter (fun f => f.1 = b) x)) x.toCharges.dedup).sum =
(Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup).sum
congr e_f π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesβ’ (fun b => Multiset.count p (Multiset.filter (fun f => f.1 = b) x)) = fun y => if p.1 = y then Multiset.count p x else 0
funext q5 e_f π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesq5:π©β’ Multiset.count p (Multiset.filter (fun f => f.1 = q5) x) = if p.1 = q5 then Multiset.count p x else 0
rw [Multiset.count_filter e_f π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesq5:π©β’ (if p.1 = q5 then Multiset.count p x else 0) = if p.1 = q5 then Multiset.count p x else 0 All goals completed! π] All goals completed! π
by_cases h_mem : p.1 β x.map Prod.fst pos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xβ’ (Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup).sum =
Multiset.count p xneg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xβ’ (Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup).sum =
Multiset.count p x
Β· pos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xβ’ (Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup).sum =
Multiset.count p x have h_mem_dedup : p.1 β (x.map Prod.fst).dedup := by π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ (Multiset.map (fun y => (f y.1) y.2) (x.toCharges.dedup.bind fun q5 => Multiset.filter (fun f => f.1 = q5) x)).sum =
(Multiset.map (fun y => (f y.1) y.2) x).sum pos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).dedupβ’ (Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup).sum =
Multiset.count p x rwa [Multiset.mem_dedup π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xβ’ p.1 β Multiset.map Prod.fst xpos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).dedupβ’ (Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup).sum =
Multiset.count p x] π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xβ’ p.1 β Multiset.map Prod.fst xpos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).dedupβ’ (Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup).sum =
Multiset.count p xpos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).dedupβ’ (Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup).sum =
Multiset.count p x
rw [Multiset.sum_map_eq_nsmul_single p.1 pos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).dedupβ’ (Multiset.count p.1 (Multiset.map Prod.fst x).dedup β’ if p.1 = p.1 then Multiset.count p x else 0) = Multiset.count p xpos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).dedupβ’ β (i' : π©), i' β p.1 β i' β (Multiset.map Prod.fst x).dedup β (if p.1 = i' then Multiset.count p x else 0) = 0 pos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).dedupβ’ (Multiset.count p.1 (Multiset.map Prod.fst x).dedup β’ if p.1 = p.1 then Multiset.count p x else 0) = Multiset.count p xpos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).dedupβ’ β (i' : π©), i' β p.1 β i' β (Multiset.map Prod.fst x).dedup β (if p.1 = i' then Multiset.count p x else 0) = 0]pos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).dedupβ’ (Multiset.count p.1 (Multiset.map Prod.fst x).dedup β’ if p.1 = p.1 then Multiset.count p x else 0) = Multiset.count p xpos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).dedupβ’ β (i' : π©), i' β p.1 β i' β (Multiset.map Prod.fst x).dedup β (if p.1 = i' then Multiset.count p x else 0) = 0
simp only [βreduceIte, smul_eq_mul] pos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).dedupβ’ Multiset.count p.1 (Multiset.map Prod.fst x).dedup * Multiset.count p x = Multiset.count p xpos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).dedupβ’ β (i' : π©), i' β p.1 β i' β (Multiset.map Prod.fst x).dedup β (if p.1 = i' then Multiset.count p x else 0) = 0
have h_count_one : Multiset.count p.1 (Multiset.map Prod.fst x).dedup = 1 := by π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ (Multiset.map (fun y => (f y.1) y.2) (x.toCharges.dedup.bind fun q5 => Multiset.filter (fun f => f.1 = q5) x)).sum =
(Multiset.map (fun y => (f y.1) y.2) x).sum pos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).deduph_count_one:Multiset.count p.1 (Multiset.map Prod.fst x).dedup = 1β’ Multiset.count p.1 (Multiset.map Prod.fst x).dedup * Multiset.count p x = Multiset.count p xpos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).dedupβ’ β (i' : π©), i' β p.1 β i' β (Multiset.map Prod.fst x).dedup β (if p.1 = i' then Multiset.count p x else 0) = 0
refine Multiset.count_eq_one_of_mem ?_ h_mem_dedup π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).dedupβ’ (Multiset.map Prod.fst x).dedup.Noduppos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).deduph_count_one:Multiset.count p.1 (Multiset.map Prod.fst x).dedup = 1β’ Multiset.count p.1 (Multiset.map Prod.fst x).dedup * Multiset.count p x = Multiset.count p xpos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).dedupβ’ β (i' : π©), i' β p.1 β i' β (Multiset.map Prod.fst x).dedup β (if p.1 = i' then Multiset.count p x else 0) = 0
exact Multiset.nodup_dedup (Multiset.map Prod.fst x)pos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).deduph_count_one:Multiset.count p.1 (Multiset.map Prod.fst x).dedup = 1β’ Multiset.count p.1 (Multiset.map Prod.fst x).dedup * Multiset.count p x = Multiset.count p xpos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).dedupβ’ β (i' : π©), i' β p.1 β i' β (Multiset.map Prod.fst x).dedup β (if p.1 = i' then Multiset.count p x else 0) = 0pos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).deduph_count_one:Multiset.count p.1 (Multiset.map Prod.fst x).dedup = 1β’ Multiset.count p.1 (Multiset.map Prod.fst x).dedup * Multiset.count p x = Multiset.count p xpos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).dedupβ’ β (i' : π©), i' β p.1 β i' β (Multiset.map Prod.fst x).dedup β (if p.1 = i' then Multiset.count p x else 0) = 0
simp [h_count_one] pos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).dedupβ’ β (i' : π©), i' β p.1 β i' β (Multiset.map Prod.fst x).dedup β (if p.1 = i' then Multiset.count p x else 0) = 0
intro q5' h h2 pos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh_mem_dedup:p.1 β (Multiset.map Prod.fst x).dedupq5':π©h:q5' β p.1h2:q5' β (Multiset.map Prod.fst x).dedupβ’ (if p.1 = q5' then Multiset.count p x else 0) = 0
simp_all [eq_comm] All goals completed! π
Β· neg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xβ’ (Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup).sum =
Multiset.count p x rw [Multiset.sum_eq_zero neg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xβ’ 0 = Multiset.count p xneg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xβ’ β x_1 β Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup, x_1 = 0 neg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xβ’ 0 = Multiset.count p xneg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xβ’ β x_1 β Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup, x_1 = 0]neg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xβ’ 0 = Multiset.count p xneg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xβ’ β x_1 β Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup, x_1 = 0
refine Eq.symm (Multiset.count_eq_zero_of_notMem ?_) neg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xβ’ p β xneg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xβ’ β x_1 β Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup, x_1 = 0
intro h neg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xh:p β xβ’ Falseneg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xβ’ β x_1 β Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup, x_1 = 0
have h_mem : p.1 β Multiset.map Prod.fst x := by π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mβ’ (Multiset.map (fun y => (f y.1) y.2) (x.toCharges.dedup.bind fun q5 => Multiset.filter (fun f => f.1 = q5) x)).sum =
(Multiset.map (fun y => (f y.1) y.2) x).sum neg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_memβ:p.1 β Multiset.map Prod.fst xh:p β xh_mem:p.1 β Multiset.map Prod.fst xβ’ Falseneg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xβ’ β x_1 β Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup, x_1 = 0
simp_allneg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_memβ:p.1 β Multiset.map Prod.fst xh:p β xh_mem:p.1 β Multiset.map Prod.fst xβ’ Falseneg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xβ’ β x_1 β Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup, x_1 = 0neg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_memβ:p.1 β Multiset.map Prod.fst xh:p β xh_mem:p.1 β Multiset.map Prod.fst xβ’ Falseneg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xβ’ β x_1 β Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup, x_1 = 0
(expose_names neg π©:Typeinst:DecidableEq π©M:Type u_1inst_1:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem_1:p.1 β Multiset.map Prod.fst xh:p β xh_mem:p.1 β Multiset.map Prod.fst xβ’ Falseneg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xβ’ β x_1 β Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup, x_1 = 0; exact h_mem_1 h_mem neg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xβ’ β x_1 β Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedup, x_1 = 0)
intro p' hp neg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xp':βhp:p' β Multiset.map (fun y => if p.1 = y then Multiset.count p x else 0) (Multiset.map Prod.fst x).dedupβ’ p' = 0
simp at hp neg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xp':βhp:β a, (β x_1, (a, x_1) β x) β§ (if p.1 = a then Multiset.count p x else 0) = p'β’ p' = 0
obtain β¨q5', β¨f1, hfβ©, hp'β© := hp neg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xp':βq5':π©hp':(if p.1 = q5' then Multiset.count p x else 0) = p'f1:Fluxeshf:(q5', f1) β xβ’ p' = 0
by_cases h_eq : p.1 = q5' pos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xp':βq5':π©hp':(if p.1 = q5' then Multiset.count p x else 0) = p'f1:Fluxeshf:(q5', f1) β xh_eq:p.1 = q5'β’ p' = 0neg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xp':βq5':π©hp':(if p.1 = q5' then Multiset.count p x else 0) = p'f1:Fluxeshf:(q5', f1) β xh_eq:Β¬p.1 = q5'β’ p' = 0
Β· pos π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xp':βq5':π©hp':(if p.1 = q5' then Multiset.count p x else 0) = p'f1:Fluxeshf:(q5', f1) β xh_eq:p.1 = q5'β’ p' = 0 simp_all All goals completed! π
Β· neg π©:TypeinstβΒΉ:DecidableEq π©M:Type u_1instβ:AddCommMonoid Mx:FiveQuanta π©f:π© β Fluxes β+ Mp:π© Γ Fluxesh_mem:p.1 β Multiset.map Prod.fst xp':βq5':π©hp':(if p.1 = q5' then Multiset.count p x else 0) = p'f1:Fluxeshf:(q5', f1) β xh_eq:Β¬p.1 = q5'β’ p' = 0 simp_all All goals completed! πB.7. Reduction does nothing if no duplicate charges
lemma reduce_eq_self_of_ofCharges_nodup (x : FiveQuanta π©) (h : x.toCharges.Nodup) :
x.reduce = x := by π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupβ’ x.reduce = x
rw [reduce, π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupβ’ Multiset.map (fun q5 => (q5, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum))
x.toCharges.dedup =
x π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupβ’ Multiset.map (fun q5 => (q5, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum)) x.toCharges = x Multiset.Nodup.dedup h π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupβ’ Multiset.map (fun q5 => (q5, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum)) x.toCharges = x π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupβ’ Multiset.map (fun q5 => (q5, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum)) x.toCharges = x] π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupβ’ Multiset.map (fun q5 => (q5, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum)) x.toCharges = x
simp [toCharges] π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupβ’ Multiset.map (fun x_1 => (x_1.1, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = x_1.1) x)).sum)) x = x
conv_rhs => rw [β Multiset.map_id x] π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodup| Multiset.map id x
apply Multiset.map_congr rfl π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupβ’ β x_1 β x, (x_1.1, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = x_1.1) x)).sum) = id x_1
intro p hp π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupp:π© Γ Fluxeshp:p β xβ’ (p.1, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x)).sum) = id p
simp only [id_eq] π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupp:π© Γ Fluxeshp:p β xβ’ (p.1, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x)).sum) = p
have x_noDup : x.Nodup := Multiset.Nodup.of_map Prod.fst h π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xβ’ (p.1, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x)).sum) = p
suffices (Multiset.filter (fun f => f.1 = p.1) x) = {p} by π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xthis:Multiset.filter (fun f => f.1 = p.1) x = {p}β’ (p.1, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = p.1) x)).sum) = p π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xβ’ Multiset.filter (fun f => f.1 = p.1) x = {p} simp [this] π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xβ’ Multiset.filter (fun f => f.1 = p.1) x = {p} π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xβ’ Multiset.filter (fun f => f.1 = p.1) x = {p}
refine (Multiset.Nodup.ext (Multiset.Nodup.filter (fun f => f.1 = p.1) x_noDup)
(Multiset.nodup_singleton p)).mpr ?_ π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xβ’ β (a : π© Γ Fluxes), a β Multiset.filter (fun f => f.1 = p.1) x β a β {p}
intro p' π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xp':π© Γ Fluxesβ’ p' β Multiset.filter (fun f => f.1 = p.1) x β p' β {p}
simp only [Multiset.mem_filter, Multiset.mem_singleton] π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xp':π© Γ Fluxesβ’ p' β x β§ p'.1 = p.1 β p' = p
constructor mp π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xp':π© Γ Fluxesβ’ p' β x β§ p'.1 = p.1 β p' = pmpr π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xp':π© Γ Fluxesβ’ p' = p β p' β x β§ p'.1 = p.1
Β· mp π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xp':π© Γ Fluxesβ’ p' β x β§ p'.1 = p.1 β p' = p rintro β¨h1, h2β© mp π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xp':π© Γ Fluxesh1:p' β xh2:p'.1 = p.1β’ p' = p
simp [toCharges] at h mp π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:(Multiset.map Prod.fst x).Nodupp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xp':π© Γ Fluxesh1:p' β xh2:p'.1 = p.1β’ p' = p
rw [propext (Multiset.nodup_map_iff_inj_on x_noDup) mp π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:β x_1 β x, β y β x, x_1.1 = y.1 β x_1 = yp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xp':π© Γ Fluxesh1:p' β xh2:p'.1 = p.1β’ p' = p mp π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:β x_1 β x, β y β x, x_1.1 = y.1 β x_1 = yp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xp':π© Γ Fluxesh1:p' β xh2:p'.1 = p.1β’ p' = p] at hmp π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:β x_1 β x, β y β x, x_1.1 = y.1 β x_1 = yp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xp':π© Γ Fluxesh1:p' β xh2:p'.1 = p.1β’ p' = p
apply h mp.a π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:β x_1 β x, β y β x, x_1.1 = y.1 β x_1 = yp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xp':π© Γ Fluxesh1:p' β xh2:p'.1 = p.1β’ p' β xmp.a π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:β x_1 β x, β y β x, x_1.1 = y.1 β x_1 = yp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xp':π© Γ Fluxesh1:p' β xh2:p'.1 = p.1β’ p β xmp.a π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:β x_1 β x, β y β x, x_1.1 = y.1 β x_1 = yp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xp':π© Γ Fluxesh1:p' β xh2:p'.1 = p.1β’ p'.1 = p.1
Β· mp.a π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:β x_1 β x, β y β x, x_1.1 = y.1 β x_1 = yp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xp':π© Γ Fluxesh1:p' β xh2:p'.1 = p.1β’ p' β x exact h1 All goals completed! π
Β· mp.a π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:β x_1 β x, β y β x, x_1.1 = y.1 β x_1 = yp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xp':π© Γ Fluxesh1:p' β xh2:p'.1 = p.1β’ p β x exact hp All goals completed! π
Β· mp.a π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:β x_1 β x, β y β x, x_1.1 = y.1 β x_1 = yp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xp':π© Γ Fluxesh1:p' β xh2:p'.1 = p.1β’ p'.1 = p.1 exact h2 All goals completed! π
Β· mpr π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xp':π© Γ Fluxesβ’ p' = p β p' β x β§ p'.1 = p.1 rintro β¨rflβ© mpr π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©h:x.toCharges.Nodupp:π© Γ Fluxeshp:p β xx_noDup:Multiset.Nodup xβ’ p β x β§ p.1 = p.1
simp_all All goals completed! πB.8. The charge map is preserved by reduction
lemma reduce_toChargeMap_eq (x : FiveQuanta π©) :
x.reduce.toChargeMap = x.toChargeMap := by π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©β’ x.reduce.toChargeMap = x.toChargeMap
funext q π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©β’ x.reduce.toChargeMap q = x.toChargeMap q
by_cases h : q β x.toCharges pos π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ x.reduce.toChargeMap q = x.toChargeMap qneg π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ x.reduce.toChargeMap q = x.toChargeMap q
Β· pos π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ x.reduce.toChargeMap q = x.toChargeMap q rw [toChargeMap, pos π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ (Multiset.map Prod.snd (Multiset.filter (fun p => p.1 = q) x.reduce)).sum = x.toChargeMap q pos π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ (Multiset.map Prod.snd {(q, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q) x)).sum)}).sum =
x.toChargeMap q reduce_filter x q h pos π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ (Multiset.map Prod.snd {(q, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q) x)).sum)}).sum =
x.toChargeMap q pos π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ (Multiset.map Prod.snd {(q, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q) x)).sum)}).sum =
x.toChargeMap q]pos π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ (Multiset.map Prod.snd {(q, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q) x)).sum)}).sum =
x.toChargeMap q
simp pos π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q) x)).sum = x.toChargeMap q
rfl All goals completed! π
Β· neg π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ x.reduce.toChargeMap q = x.toChargeMap q rw [toChargeMap_of_not_mem, neg π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ 0 = x.toChargeMap qneg.h π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ q β x.reduce.toCharges neg.h π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ q β x.toChargesneg.h π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ q β x.reduce.toCharges toChargeMap_of_not_mem neg π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ 0 = 0neg.h π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ q β x.toChargesneg.h π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ q β x.reduce.toChargesneg.h π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ q β x.toChargesneg.h π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ q β x.reduce.toCharges]neg.h π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ q β x.toChargesneg.h π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ q β x.reduce.toCharges
Β· neg.h π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ q β x.toCharges exact h All goals completed! π
Β· neg.h π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©h:q β x.toChargesβ’ q β x.reduce.toCharges simpa [reduce_toCharges] using h All goals completed! π
B.9. A fluxes in the reduced FiveQuanta is a sum of fluxes in the original FiveQuanta
lemma mem_powerset_sum_of_mem_reduce_toFluxesFive {F : FiveQuanta π©}
{f : Fluxes} (hf : f β F.reduce.toFluxesFive) :
f β (Multiset.powerset F.toFluxesFive).map fun s => s.sum := by π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©f:Fluxeshf:f β F.reduce.toFluxesFiveβ’ f β Multiset.map (fun s => s.sum) (Multiset.powerset F.toFluxesFive)
rw [toFluxesFive, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©f:Fluxeshf:f β Multiset.map Prod.snd F.reduceβ’ f β Multiset.map (fun s => s.sum) (Multiset.powerset F.toFluxesFive) π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©f:Fluxeshf:β a β F.reduce, a.2 = fβ’ f β Multiset.map (fun s => s.sum) (Multiset.powerset F.toFluxesFive) Multiset.mem_map π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©f:Fluxeshf:β a β F.reduce, a.2 = fβ’ f β Multiset.map (fun s => s.sum) (Multiset.powerset F.toFluxesFive) π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©f:Fluxeshf:β a β F.reduce, a.2 = fβ’ f β Multiset.map (fun s => s.sum) (Multiset.powerset F.toFluxesFive)] at hf π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©f:Fluxeshf:β a β F.reduce, a.2 = fβ’ f β Multiset.map (fun s => s.sum) (Multiset.powerset F.toFluxesFive)
obtain β¨β¨q, fβ©, hp, rflβ© := hf π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©f:Fluxeshp:(q, f) β F.reduceβ’ (q, f).2 β Multiset.map (fun s => s.sum) (Multiset.powerset F.toFluxesFive)
rw [mem_reduce_iff π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©f:Fluxeshp:(q, f).1 β F.toCharges β§ (q, f).2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f_1 => f_1.1 = (q, f).1) F)).sumβ’ (q, f).2 β Multiset.map (fun s => s.sum) (Multiset.powerset F.toFluxesFive) π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©f:Fluxeshp:(q, f).1 β F.toCharges β§ (q, f).2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f_1 => f_1.1 = (q, f).1) F)).sumβ’ (q, f).2 β Multiset.map (fun s => s.sum) (Multiset.powerset F.toFluxesFive)] at hp π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©f:Fluxeshp:(q, f).1 β F.toCharges β§ (q, f).2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f_1 => f_1.1 = (q, f).1) F)).sumβ’ (q, f).2 β Multiset.map (fun s => s.sum) (Multiset.powerset F.toFluxesFive)
simp at hp π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©f:Fluxeshp:q β F.toCharges β§ f = (Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F)).sumβ’ (q, f).2 β Multiset.map (fun s => s.sum) (Multiset.powerset F.toFluxesFive)
obtain β¨hq, rflβ© := hp π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©hq:q β F.toChargesβ’ (q, (Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F)).sum).2 β
Multiset.map (fun s => s.sum) (Multiset.powerset F.toFluxesFive)
simp only [Multiset.mem_map, Multiset.mem_powerset] π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©hq:q β F.toChargesβ’ β a β€ F.toFluxesFive, a.sum = (Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F)).sum
use (Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F)) h π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©hq:q β F.toChargesβ’ Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F) β€ F.toFluxesFive β§
(Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F)).sum =
(Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F)).sum
exact β¨Multiset.map_le_map (Multiset.filter_le _ F), rflβ© All goals completed! π
lemma mem_powerset_sum_of_mem_reduce_toFluxesFive_filter {F : FiveQuanta π©}
{f : Fluxes} (hf : f β F.reduce.toFluxesFive) :
f β (F.toFluxesFive.powerset.filter fun s => s β β
).map fun s => s.sum := by π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©f:Fluxeshf:f β F.reduce.toFluxesFiveβ’ f β Multiset.map (fun s => s.sum) (Multiset.filter (fun s => s β β
) (Multiset.powerset F.toFluxesFive))
rw [toFluxesFive, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©f:Fluxeshf:f β Multiset.map Prod.snd F.reduceβ’ f β Multiset.map (fun s => s.sum) (Multiset.filter (fun s => s β β
) (Multiset.powerset F.toFluxesFive)) π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©f:Fluxeshf:β a β F.reduce, a.2 = fβ’ f β Multiset.map (fun s => s.sum) (Multiset.filter (fun s => s β β
) (Multiset.powerset F.toFluxesFive)) Multiset.mem_map π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©f:Fluxeshf:β a β F.reduce, a.2 = fβ’ f β Multiset.map (fun s => s.sum) (Multiset.filter (fun s => s β β
) (Multiset.powerset F.toFluxesFive)) π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©f:Fluxeshf:β a β F.reduce, a.2 = fβ’ f β Multiset.map (fun s => s.sum) (Multiset.filter (fun s => s β β
) (Multiset.powerset F.toFluxesFive))] at hf π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©f:Fluxeshf:β a β F.reduce, a.2 = fβ’ f β Multiset.map (fun s => s.sum) (Multiset.filter (fun s => s β β
) (Multiset.powerset F.toFluxesFive))
obtain β¨β¨q, fβ©, hp, rflβ© := hf π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©f:Fluxeshp:(q, f) β F.reduceβ’ (q, f).2 β Multiset.map (fun s => s.sum) (Multiset.filter (fun s => s β β
) (Multiset.powerset F.toFluxesFive))
rw [mem_reduce_iff π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©f:Fluxeshp:(q, f).1 β F.toCharges β§ (q, f).2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f_1 => f_1.1 = (q, f).1) F)).sumβ’ (q, f).2 β Multiset.map (fun s => s.sum) (Multiset.filter (fun s => s β β
) (Multiset.powerset F.toFluxesFive)) π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©f:Fluxeshp:(q, f).1 β F.toCharges β§ (q, f).2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f_1 => f_1.1 = (q, f).1) F)).sumβ’ (q, f).2 β Multiset.map (fun s => s.sum) (Multiset.filter (fun s => s β β
) (Multiset.powerset F.toFluxesFive))] at hp π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©f:Fluxeshp:(q, f).1 β F.toCharges β§ (q, f).2 = (Multiset.map (fun y => y.2) (Multiset.filter (fun f_1 => f_1.1 = (q, f).1) F)).sumβ’ (q, f).2 β Multiset.map (fun s => s.sum) (Multiset.filter (fun s => s β β
) (Multiset.powerset F.toFluxesFive))
simp at hp π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©f:Fluxeshp:q β F.toCharges β§ f = (Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F)).sumβ’ (q, f).2 β Multiset.map (fun s => s.sum) (Multiset.filter (fun s => s β β
) (Multiset.powerset F.toFluxesFive))
obtain β¨hq, rflβ© := hp π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©hq:q β F.toChargesβ’ (q, (Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F)).sum).2 β
Multiset.map (fun s => s.sum) (Multiset.filter (fun s => s β β
) (Multiset.powerset F.toFluxesFive))
simp only [Multiset.mem_map] π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©hq:q β F.toChargesβ’ β a β Multiset.filter (fun s => s β β
) (Multiset.powerset F.toFluxesFive),
a.sum = (Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F)).sum
use (Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F)) h π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©hq:q β F.toChargesβ’ Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F) β
Multiset.filter (fun s => s β β
) (Multiset.powerset F.toFluxesFive) β§
(Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F)).sum =
(Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F)).sum
simp only [and_true] h π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©hq:q β F.toChargesβ’ Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F) β
Multiset.filter (fun s => s β β
) (Multiset.powerset F.toFluxesFive)
rw [Multiset.mem_filter h π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©hq:q β F.toChargesβ’ Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F) β Multiset.powerset F.toFluxesFive β§
Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F) β β
h π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©hq:q β F.toChargesβ’ Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F) β Multiset.powerset F.toFluxesFive β§
Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F) β β
]h π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©hq:q β F.toChargesβ’ Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F) β Multiset.powerset F.toFluxesFive β§
Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F) β β
apply And.intro h.left π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©hq:q β F.toChargesβ’ Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F) β Multiset.powerset F.toFluxesFiveh.right π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©hq:q β F.toChargesβ’ Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F) β β
exact Multiset.mem_powerset.mpr (Multiset.map_le_map (Multiset.filter_le (fun x => x.1 = q) F)) h.right π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©hq:q β F.toChargesβ’ Multiset.map (fun x => x.2) (Multiset.filter (fun x => x.1 = q) F) β β
simp [Multiset.empty_eq_zero, ne_eq, Multiset.map_eq_zero, Multiset.filter_eq_nil,
Prod.forall, not_forall, Decidable.not_not] h.right π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©hq:q β F.toChargesβ’ β x, (q, x) β F
rw [toCharges, h.right π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©hq:q β Multiset.map Prod.fst Fβ’ β x, (q, x) β F h.right π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©hq:β a β F, a.1 = qβ’ β x, (q, x) β F Multiset.mem_map h.right π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©hq:β a β F, a.1 = qβ’ β x, (q, x) β Fh.right π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©hq:β a β F, a.1 = qβ’ β x, (q, x) β F] at hqh.right π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©q:π©hq:β a β F, a.1 = qβ’ β x, (q, x) β F
obtain β¨a, ha, rflβ© := hq h.right π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©a:π© Γ Fluxesha:a β Fβ’ β x, (a.1, x) β F
use a.2 All goals completed! π
B.10. No exotics condition on the reduced FiveQuanta
B.10.1. Number of chiral L
lemma reduce_numChiralL_of_mem_elemsNoExotics {F : FiveQuanta π©}
(hx : F.toFluxesFive β FluxesFive.elemsNoExotics) :
F.reduce.toFluxesFive.numChiralL = 3 := by π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ F.reduce.toFluxesFive.numChiralL = 3
have hE : F.toFluxesFive.NoExotics := ((FluxesFive.noExotics_iff_mem_elemsNoExotics _).mpr hx).1 π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticsβ’ F.reduce.toFluxesFive.numChiralL = 3
have hnn : β a β F.reduce.toFluxesFive.map (fun f => f.M + f.N), 0 β€ a := by
intro a ha π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticsa:β€ha:a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFiveβ’ 0 β€ a π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ F.reduce.toFluxesFive.numChiralL = 3
obtain β¨f, hf, rflβ© := Multiset.mem_map.mp ha π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticsf:Fluxeshf:f β F.reduce.toFluxesFiveha:f.M + f.N β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFiveβ’ 0 β€ f.M + f.N π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ F.reduce.toFluxesFive.numChiralL = 3
replace hf := mem_powerset_sum_of_mem_reduce_toFluxesFive hf π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticsf:Fluxesha:f.M + f.N β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFivehf:f β Multiset.map (fun s => s.sum) (Multiset.powerset F.toFluxesFive)β’ 0 β€ f.M + f.N π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ F.reduce.toFluxesFive.numChiralL = 3
clear ha hE π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsf:Fluxeshf:f β Multiset.map (fun s => s.sum) (Multiset.powerset F.toFluxesFive)β’ 0 β€ f.M + f.N π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ F.reduce.toFluxesFive.numChiralL = 3
generalize F.toFluxesFive = G at * π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©f:FluxesG:FluxesFivehx:G β FluxesFive.elemsNoExoticshf:f β Multiset.map (fun s => s.sum) (Multiset.powerset G)β’ 0 β€ f.M + f.N π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ F.reduce.toFluxesFive.numChiralL = 3
revert f π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©G:FluxesFivehx:G β FluxesFive.elemsNoExoticsβ’ β f β Multiset.map (fun s => s.sum) (Multiset.powerset G), 0 β€ f.M + f.N π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ F.reduce.toFluxesFive.numChiralL = 3
revert G π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©β’ β G β FluxesFive.elemsNoExotics, β f β Multiset.map (fun s => s.sum) (Multiset.powerset G), 0 β€ f.M + f.N π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ F.reduce.toFluxesFive.numChiralL = 3
decide π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ F.reduce.toFluxesFive.numChiralL = 3 π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ F.reduce.toFluxesFive.numChiralL = 3
rw [FluxesFive.numChiralL, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.filter (fun x => 0 β€ x) F.reduce.toFluxesFive.chiralIndicesOfL).sum = 3 π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F.reduce).sum = (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F).sum FluxesFive.chiralIndicesOfL, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.filter (fun x => 0 β€ x) (Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive)).sum = 3 π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F.reduce).sum = (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F).sum Multiset.filter_eq_self.mpr hnn, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive).sum = 3 π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F.reduce).sum = (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F).sum
β FluxesFive.chiralIndicesOfL_sum_eq_three_of_noExotics _ hE, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive).sum = F.toFluxesFive.chiralIndicesOfL.sum π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F.reduce).sum = (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F).sum FluxesFive.chiralIndicesOfL, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive).sum = (Multiset.map (fun f => f.M + f.N) F.toFluxesFive).sum π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F.reduce).sum = (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F).sum
toFluxesFive, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map (fun f => f.M + f.N) (Multiset.map Prod.snd F.reduce)).sum =
(Multiset.map (fun f => f.M + f.N) F.toFluxesFive).sum π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F.reduce).sum = (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F).sum toFluxesFive, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map (fun f => f.M + f.N) (Multiset.map Prod.snd F.reduce)).sum =
(Multiset.map (fun f => f.M + f.N) (Multiset.map Prod.snd F)).sum π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F.reduce).sum = (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F).sum Multiset.map_map, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F.reduce).sum =
(Multiset.map (fun f => f.M + f.N) (Multiset.map Prod.snd F)).sum π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F.reduce).sum = (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F).sum Multiset.map_map π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F.reduce).sum = (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F).sum π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F.reduce).sum = (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F).sum] π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F.reduce).sum = (Multiset.map ((fun f => f.M + f.N) β Prod.snd) F).sum
exact reduce_sum_eq_sum_toCharges F (fun _ =>
β¨β¨fun f => f.M + f.N, by π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ axβ:π©β’ Fluxes.M 0 + Fluxes.N 0 = 0 simp All goals completed! πβ©, fun x y => by π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, 0 β€ axβ:π©x:Fluxesy:Fluxesβ’ { toFun := fun f => f.M + f.N, map_zero' := β― }.toFun (x + y) =
{ toFun := fun f => f.M + f.N, map_zero' := β― }.toFun x + { toFun := fun f => f.M + f.N, map_zero' := β― }.toFun y simp [add_add_add_comm] All goals completed! πβ©)
B.10.2. Number of anti-chiral L
lemma reduce_numAntiChiralL_of_mem_elemsNoExotics {F : FiveQuanta π©}
(hx : F.toFluxesFive β FluxesFive.elemsNoExotics) :
F.reduce.toFluxesFive.numAntiChiralL = 0 := by π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ F.reduce.toFluxesFive.numAntiChiralL = 0
rw [FluxesFive.numAntiChiralL, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ (Multiset.filter (fun x => x < 0) F.reduce.toFluxesFive.chiralIndicesOfL).sum = 0 π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, Β¬a < 0 FluxesFive.chiralIndicesOfL, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ (Multiset.filter (fun x => x < 0) (Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive)).sum = 0 π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, Β¬a < 0
Multiset.filter_eq_nil.mpr ?_, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ Multiset.sum 0 = 0π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, Β¬a < 0 π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, Β¬a < 0 Multiset.sum_zero π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ 0 = 0π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, Β¬a < 0 π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, Β¬a < 0] π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ β a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFive, Β¬a < 0
intro a ha π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsa:β€ha:a β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFiveβ’ Β¬a < 0
obtain β¨f, hf, rflβ© := Multiset.mem_map.mp ha π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsf:Fluxeshf:f β F.reduce.toFluxesFiveha:f.M + f.N β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFiveβ’ Β¬f.M + f.N < 0
replace hf := mem_powerset_sum_of_mem_reduce_toFluxesFive hf π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsf:Fluxesha:f.M + f.N β Multiset.map (fun f => f.M + f.N) F.reduce.toFluxesFivehf:f β Multiset.map (fun s => s.sum) (Multiset.powerset F.toFluxesFive)β’ Β¬f.M + f.N < 0
clear ha π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsf:Fluxeshf:f β Multiset.map (fun s => s.sum) (Multiset.powerset F.toFluxesFive)β’ Β¬f.M + f.N < 0
generalize F.toFluxesFive = G at * π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©f:FluxesG:FluxesFivehx:G β FluxesFive.elemsNoExoticshf:f β Multiset.map (fun s => s.sum) (Multiset.powerset G)β’ Β¬f.M + f.N < 0
revert f π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©G:FluxesFivehx:G β FluxesFive.elemsNoExoticsβ’ β f β Multiset.map (fun s => s.sum) (Multiset.powerset G), Β¬f.M + f.N < 0
revert G π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©β’ β G β FluxesFive.elemsNoExotics, β f β Multiset.map (fun s => s.sum) (Multiset.powerset G), Β¬f.M + f.N < 0
decide All goals completed! π
B.10.3. Number of chiral D
lemma reduce_numChiralD_of_mem_elemsNoExotics {F : FiveQuanta π©}
(hx : F.toFluxesFive β FluxesFive.elemsNoExotics) :
F.reduce.toFluxesFive.numChiralD = 3 := by π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ F.reduce.toFluxesFive.numChiralD = 3
have hE : F.toFluxesFive.NoExotics := ((FluxesFive.noExotics_iff_mem_elemsNoExotics _).mpr hx).1 π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticsβ’ F.reduce.toFluxesFive.numChiralD = 3
have hnn : β a β F.reduce.toFluxesFive.map (fun f => f.M), 0 β€ a := by
intro a ha π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticsa:β€ha:a β Multiset.map (fun f => f.M) F.reduce.toFluxesFiveβ’ 0 β€ a π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ F.reduce.toFluxesFive.numChiralD = 3
obtain β¨f, hf, rflβ© := Multiset.mem_map.mp ha π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticsf:Fluxeshf:f β F.reduce.toFluxesFiveha:f.M β Multiset.map (fun f => f.M) F.reduce.toFluxesFiveβ’ 0 β€ f.M π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ F.reduce.toFluxesFive.numChiralD = 3
replace hf := mem_powerset_sum_of_mem_reduce_toFluxesFive hf π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticsf:Fluxesha:f.M β Multiset.map (fun f => f.M) F.reduce.toFluxesFivehf:f β Multiset.map (fun s => s.sum) (Multiset.powerset F.toFluxesFive)β’ 0 β€ f.M π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ F.reduce.toFluxesFive.numChiralD = 3
clear ha hE π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsf:Fluxeshf:f β Multiset.map (fun s => s.sum) (Multiset.powerset F.toFluxesFive)β’ 0 β€ f.M π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ F.reduce.toFluxesFive.numChiralD = 3
generalize F.toFluxesFive = G at * π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©f:FluxesG:FluxesFivehx:G β FluxesFive.elemsNoExoticshf:f β Multiset.map (fun s => s.sum) (Multiset.powerset G)β’ 0 β€ f.M π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ F.reduce.toFluxesFive.numChiralD = 3
revert f π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©G:FluxesFivehx:G β FluxesFive.elemsNoExoticsβ’ β f β Multiset.map (fun s => s.sum) (Multiset.powerset G), 0 β€ f.M π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ F.reduce.toFluxesFive.numChiralD = 3
revert G π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©β’ β G β FluxesFive.elemsNoExotics, β f β Multiset.map (fun s => s.sum) (Multiset.powerset G), 0 β€ f.M π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ F.reduce.toFluxesFive.numChiralD = 3
decide π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ F.reduce.toFluxesFive.numChiralD = 3 π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ F.reduce.toFluxesFive.numChiralD = 3
rw [FluxesFive.numChiralD, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.filter (fun x => 0 β€ x) F.reduce.toFluxesFive.chiralIndicesOfD).sum = 3 π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M) β Prod.snd) F.reduce).sum = (Multiset.map ((fun f => f.M) β Prod.snd) F).sum FluxesFive.chiralIndicesOfD, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.filter (fun x => 0 β€ x) (Multiset.map (fun f => f.M) F.reduce.toFluxesFive)).sum = 3 π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M) β Prod.snd) F.reduce).sum = (Multiset.map ((fun f => f.M) β Prod.snd) F).sum Multiset.filter_eq_self.mpr hnn, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map (fun f => f.M) F.reduce.toFluxesFive).sum = 3 π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M) β Prod.snd) F.reduce).sum = (Multiset.map ((fun f => f.M) β Prod.snd) F).sum
β FluxesFive.chiralIndicesOfD_sum_eq_three_of_noExotics _ hE, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map (fun f => f.M) F.reduce.toFluxesFive).sum = F.toFluxesFive.chiralIndicesOfD.sum π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M) β Prod.snd) F.reduce).sum = (Multiset.map ((fun f => f.M) β Prod.snd) F).sum FluxesFive.chiralIndicesOfD, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map (fun f => f.M) F.reduce.toFluxesFive).sum = (Multiset.map (fun f => f.M) F.toFluxesFive).sum π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M) β Prod.snd) F.reduce).sum = (Multiset.map ((fun f => f.M) β Prod.snd) F).sum
toFluxesFive, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map (fun f => f.M) (Multiset.map Prod.snd F.reduce)).sum = (Multiset.map (fun f => f.M) F.toFluxesFive).sum π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M) β Prod.snd) F.reduce).sum = (Multiset.map ((fun f => f.M) β Prod.snd) F).sum toFluxesFive, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map (fun f => f.M) (Multiset.map Prod.snd F.reduce)).sum =
(Multiset.map (fun f => f.M) (Multiset.map Prod.snd F)).sum π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M) β Prod.snd) F.reduce).sum = (Multiset.map ((fun f => f.M) β Prod.snd) F).sum Multiset.map_map, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M) β Prod.snd) F.reduce).sum = (Multiset.map (fun f => f.M) (Multiset.map Prod.snd F)).sum π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M) β Prod.snd) F.reduce).sum = (Multiset.map ((fun f => f.M) β Prod.snd) F).sum Multiset.map_map π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M) β Prod.snd) F.reduce).sum = (Multiset.map ((fun f => f.M) β Prod.snd) F).sum π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M) β Prod.snd) F.reduce).sum = (Multiset.map ((fun f => f.M) β Prod.snd) F).sum] π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ aβ’ (Multiset.map ((fun f => f.M) β Prod.snd) F.reduce).sum = (Multiset.map ((fun f => f.M) β Prod.snd) F).sum
exact reduce_sum_eq_sum_toCharges F (fun _ => β¨β¨fun f => f.M, by π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ axβ:π©β’ Fluxes.M 0 = 0 simp All goals completed! πβ©, fun x y => by π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticshE:F.toFluxesFive.NoExoticshnn:β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, 0 β€ axβ:π©x:Fluxesy:Fluxesβ’ { toFun := fun f => f.M, map_zero' := β― }.toFun (x + y) =
{ toFun := fun f => f.M, map_zero' := β― }.toFun x + { toFun := fun f => f.M, map_zero' := β― }.toFun y simp All goals completed! πβ©)
B.10.4. Number of anti-chiral D
lemma reduce_numAntiChiralD_of_mem_elemsNoExotics {F : FiveQuanta π©}
(hx : F.toFluxesFive β FluxesFive.elemsNoExotics) :
F.reduce.toFluxesFive.numAntiChiralD = 0 := by π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ F.reduce.toFluxesFive.numAntiChiralD = 0
rw [FluxesFive.numAntiChiralD, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ (Multiset.filter (fun x => x < 0) F.reduce.toFluxesFive.chiralIndicesOfD).sum = 0 π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, Β¬a < 0 FluxesFive.chiralIndicesOfD, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ (Multiset.filter (fun x => x < 0) (Multiset.map (fun f => f.M) F.reduce.toFluxesFive)).sum = 0 π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, Β¬a < 0
Multiset.filter_eq_nil.mpr ?_, π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ Multiset.sum 0 = 0π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, Β¬a < 0 π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, Β¬a < 0 Multiset.sum_zero π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ 0 = 0π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, Β¬a < 0 π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, Β¬a < 0] π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ β a β Multiset.map (fun f => f.M) F.reduce.toFluxesFive, Β¬a < 0
intro a ha π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsa:β€ha:a β Multiset.map (fun f => f.M) F.reduce.toFluxesFiveβ’ Β¬a < 0
obtain β¨f, hf, rflβ© := Multiset.mem_map.mp ha π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsf:Fluxeshf:f β F.reduce.toFluxesFiveha:f.M β Multiset.map (fun f => f.M) F.reduce.toFluxesFiveβ’ Β¬f.M < 0
replace hf := mem_powerset_sum_of_mem_reduce_toFluxesFive hf π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsf:Fluxesha:f.M β Multiset.map (fun f => f.M) F.reduce.toFluxesFivehf:f β Multiset.map (fun s => s.sum) (Multiset.powerset F.toFluxesFive)β’ Β¬f.M < 0
clear ha π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsf:Fluxeshf:f β Multiset.map (fun s => s.sum) (Multiset.powerset F.toFluxesFive)β’ Β¬f.M < 0
generalize F.toFluxesFive = G at * π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©f:FluxesG:FluxesFivehx:G β FluxesFive.elemsNoExoticshf:f β Multiset.map (fun s => s.sum) (Multiset.powerset G)β’ Β¬f.M < 0
revert f π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©G:FluxesFivehx:G β FluxesFive.elemsNoExoticsβ’ β f β Multiset.map (fun s => s.sum) (Multiset.powerset G), Β¬f.M < 0
revert G π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©β’ β G β FluxesFive.elemsNoExotics, β f β Multiset.map (fun s => s.sum) (Multiset.powerset G), Β¬f.M < 0
decide All goals completed! π
B.10.5. The NoExotics condition on the reduced FiveQuanta
lemma reduce_noExotics_of_mem_elemsNoExotics {F : FiveQuanta π©}
(hx : F.toFluxesFive β FluxesFive.elemsNoExotics) :
F.reduce.toFluxesFive.NoExotics := by π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ F.reduce.toFluxesFive.NoExotics
simp [FluxesFive.NoExotics, reduce_numChiralL_of_mem_elemsNoExotics hx,
reduce_numAntiChiralL_of_mem_elemsNoExotics hx, reduce_numChiralD_of_mem_elemsNoExotics hx,
reduce_numAntiChiralD_of_mem_elemsNoExotics hx] All goals completed! π
B.11. Reduce member of FluxesFive.elemsNoExotics
lemma reduce_mem_elemsNoExotics {F : FiveQuanta π©}
(hx : F.toFluxesFive β FluxesFive.elemsNoExotics) :
F.reduce.toFluxesFive β FluxesFive.elemsNoExotics := by π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ F.reduce.toFluxesFive β FluxesFive.elemsNoExotics
rw [β FluxesFive.noExotics_iff_mem_elemsNoExotics π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ F.reduce.toFluxesFive.NoExotics β§ F.reduce.toFluxesFive.HasNoZero π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ F.reduce.toFluxesFive.NoExotics β§ F.reduce.toFluxesFive.HasNoZero] π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsβ’ F.reduce.toFluxesFive.NoExotics β§ F.reduce.toFluxesFive.HasNoZero
refine β¨reduce_noExotics_of_mem_elemsNoExotics hx, fun h => ?_β© π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsh:0 β F.reduce.toFluxesFiveβ’ False
replace h := mem_powerset_sum_of_mem_reduce_toFluxesFive_filter h π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©hx:F.toFluxesFive β FluxesFive.elemsNoExoticsh:0 β Multiset.map (fun s => s.sum) (Multiset.filter (fun s => s β β
) (Multiset.powerset F.toFluxesFive))β’ False
generalize F.toFluxesFive = G at * π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©G:FluxesFivehx:G β FluxesFive.elemsNoExoticsh:0 β Multiset.map (fun s => s.sum) (Multiset.filter (fun s => s β β
) (Multiset.powerset G))β’ False
revert G π©:Typeinstβ:DecidableEq π©F:FiveQuanta π©β’ β G β FluxesFive.elemsNoExotics,
0 β Multiset.map (fun s => s.sum) (Multiset.filter (fun s => s β β
) (Multiset.powerset G)) β False
decide All goals completed! π
C. Decomposition of a FiveQuanta into basic fluxes
C.1. Decomposition of fluxes
The decomposition of a flux into β¨1, -1β© and β¨0, 1β©.
def decomposeFluxes (f : Fluxes) : Multiset Fluxes :=
Multiset.replicate (Int.natAbs f.M) β¨1, -1β© +
Multiset.replicate (Int.natAbs (f.M + f.N)) β¨0, 1β©lemma decomposeFluxes_sum_of_noExotics (f : Fluxes) (hf : β F β FluxesFive.elemsNoExotics, f β F) :
(decomposeFluxes f).sum = f := by f:Fluxeshf:β F β FluxesFive.elemsNoExotics, f β Fβ’ (decomposeFluxes f).sum = f
obtain β¨F, hF, hfFβ© := hf f:FluxesF:FluxesFivehF:F β FluxesFive.elemsNoExoticshfF:f β Fβ’ (decomposeFluxes f).sum = f
revert f F:FluxesFivehF:F β FluxesFive.elemsNoExoticsβ’ β f β F, (decomposeFluxes f).sum = f
revert F β’ β F β FluxesFive.elemsNoExotics, β f β F, (decomposeFluxes f).sum = f
decide All goals completed! π
C.2. Decomposition of a FiveQuanta (with no exotics)
The decomposition of a FiveQuanta into a FiveQuanta which has the
same reduce by has fluxes β¨1, -1β© and β¨0,1β© only.
def decompose (x : FiveQuanta π©) : FiveQuanta π© :=
x.bind fun p => (decomposeFluxes p.2).map fun f => (p.1, f)C.2.1. Decomposition distributes over addition
lemma decompose_add (x y : FiveQuanta π©) :
(x + y).decompose = x.decompose + y.decompose := by π©:Typex:FiveQuanta π©y:FiveQuanta π©β’ (x + y).decompose = x.decompose + y.decompose
simp [decompose] All goals completed! πC.2.2. Decomposition commutes with filtering charges
lemma decompose_filter_charge [DecidableEq π©] (x : FiveQuanta π©) (q : π©) :
(x.decompose).filter (fun p => p.1 = q) =
decompose (x.filter (fun p => p.1 = q)) := by π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©β’ Multiset.filter (fun p => p.1 = q) x.decompose = decompose (Multiset.filter (fun p => p.1 = q) x)
rw [decompose π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©β’ Multiset.filter (fun p => p.1 = q) (Multiset.bind x fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x) π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©β’ Multiset.filter (fun p => p.1 = q) (Multiset.bind x fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)] π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©β’ Multiset.filter (fun p => p.1 = q) (Multiset.bind x fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)
revert x π©:Typeinstβ:DecidableEq π©q:π©β’ β (x : FiveQuanta π©),
Multiset.filter (fun p => p.1 = q) (Multiset.bind x fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)
apply Multiset.induction empty π©:Typeinstβ:DecidableEq π©q:π©β’ Multiset.filter (fun p => p.1 = q) (Multiset.bind 0 fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) 0)cons π©:Typeinstβ:DecidableEq π©q:π©β’ β (a : π© Γ Fluxes) (s : Multiset (π© Γ Fluxes)),
Multiset.filter (fun p => p.1 = q) (s.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) s) β
Multiset.filter (fun p => p.1 = q)
((a ::β s).bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) (a ::β s))
Β· empty π©:Typeinstβ:DecidableEq π©q:π©β’ Multiset.filter (fun p => p.1 = q) (Multiset.bind 0 fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) 0) simp [decompose] All goals completed! π
Β· cons π©:Typeinstβ:DecidableEq π©q:π©β’ β (a : π© Γ Fluxes) (s : Multiset (π© Γ Fluxes)),
Multiset.filter (fun p => p.1 = q) (s.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) s) β
Multiset.filter (fun p => p.1 = q)
((a ::β s).bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) (a ::β s)) intro a x ih cons π©:Typeinstβ:DecidableEq π©q:π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)ih:Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)β’ Multiset.filter (fun p => p.1 = q) ((a ::β x).bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) (a ::β x))
simp only [Multiset.cons_bind, Multiset.filter_add] cons π©:Typeinstβ:DecidableEq π©q:π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)ih:Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)β’ Multiset.filter (fun p => p.1 = q) (Multiset.map (fun f => (a.1, f)) (decomposeFluxes a.2)) +
Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) (a ::β x))
rw [Multiset.filter_cons, cons π©:Typeinstβ:DecidableEq π©q:π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)ih:Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)β’ Multiset.filter (fun p => p.1 = q) (Multiset.map (fun f => (a.1, f)) (decomposeFluxes a.2)) +
Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose ((if a.1 = q then {a} else 0) + Multiset.filter (fun p => p.1 = q) x) cons π©:Typeinstβ:DecidableEq π©q:π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)ih:Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)β’ Multiset.filter (fun p => p.1 = q) (Multiset.map (fun f => (a.1, f)) (decomposeFluxes a.2)) +
decompose (Multiset.filter (fun p => p.1 = q) x) =
decompose (if a.1 = q then {a} else 0) + decompose (Multiset.filter (fun p => p.1 = q) x) decompose_add, cons π©:Typeinstβ:DecidableEq π©q:π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)ih:Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)β’ Multiset.filter (fun p => p.1 = q) (Multiset.map (fun f => (a.1, f)) (decomposeFluxes a.2)) +
Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (if a.1 = q then {a} else 0) + decompose (Multiset.filter (fun p => p.1 = q) x)cons π©:Typeinstβ:DecidableEq π©q:π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)ih:Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)β’ Multiset.filter (fun p => p.1 = q) (Multiset.map (fun f => (a.1, f)) (decomposeFluxes a.2)) +
decompose (Multiset.filter (fun p => p.1 = q) x) =
decompose (if a.1 = q then {a} else 0) + decompose (Multiset.filter (fun p => p.1 = q) x) ih cons π©:Typeinstβ:DecidableEq π©q:π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)ih:Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)β’ Multiset.filter (fun p => p.1 = q) (Multiset.map (fun f => (a.1, f)) (decomposeFluxes a.2)) +
decompose (Multiset.filter (fun p => p.1 = q) x) =
decompose (if a.1 = q then {a} else 0) + decompose (Multiset.filter (fun p => p.1 = q) x)cons π©:Typeinstβ:DecidableEq π©q:π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)ih:Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)β’ Multiset.filter (fun p => p.1 = q) (Multiset.map (fun f => (a.1, f)) (decomposeFluxes a.2)) +
decompose (Multiset.filter (fun p => p.1 = q) x) =
decompose (if a.1 = q then {a} else 0) + decompose (Multiset.filter (fun p => p.1 = q) x)]cons π©:Typeinstβ:DecidableEq π©q:π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)ih:Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)β’ Multiset.filter (fun p => p.1 = q) (Multiset.map (fun f => (a.1, f)) (decomposeFluxes a.2)) +
decompose (Multiset.filter (fun p => p.1 = q) x) =
decompose (if a.1 = q then {a} else 0) + decompose (Multiset.filter (fun p => p.1 = q) x)
congr cons.e_a π©:Typeinstβ:DecidableEq π©q:π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)ih:Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)β’ Multiset.filter (fun p => p.1 = q) (Multiset.map (fun f => (a.1, f)) (decomposeFluxes a.2)) =
decompose (if a.1 = q then {a} else 0)
match a with
| (q', f) => π©:Typeinstβ:DecidableEq π©q:π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)ih:Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)q':π©f:Fluxesβ’ Multiset.filter (fun p => p.1 = q) (Multiset.map (fun f_1 => ((q', f).1, f_1)) (decomposeFluxes (q', f).2)) =
decompose (if (q', f).1 = q then {(q', f)} else 0)
simp [decomposeFluxes] π©:Typeinstβ:DecidableEq π©q:π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)ih:Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)q':π©f:Fluxesβ’ Multiset.filter (fun p => p.1 = q) (Multiset.replicate f.M.natAbs (q', { M := 1, N := -1 })) +
Multiset.filter (fun p => p.1 = q) (Multiset.replicate (f.M + f.N).natAbs (q', { M := 0, N := 1 })) =
decompose (if q' = q then {(q', f)} else 0)
by_cases h : q' = q pos π©:Typeinstβ:DecidableEq π©q:π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)ih:Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)q':π©f:Fluxesh:q' = qβ’ Multiset.filter (fun p => p.1 = q) (Multiset.replicate f.M.natAbs (q', { M := 1, N := -1 })) +
Multiset.filter (fun p => p.1 = q) (Multiset.replicate (f.M + f.N).natAbs (q', { M := 0, N := 1 })) =
decompose (if q' = q then {(q', f)} else 0)neg π©:Typeinstβ:DecidableEq π©q:π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)ih:Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)q':π©f:Fluxesh:Β¬q' = qβ’ Multiset.filter (fun p => p.1 = q) (Multiset.replicate f.M.natAbs (q', { M := 1, N := -1 })) +
Multiset.filter (fun p => p.1 = q) (Multiset.replicate (f.M + f.N).natAbs (q', { M := 0, N := 1 })) =
decompose (if q' = q then {(q', f)} else 0)
Β· pos π©:Typeinstβ:DecidableEq π©q:π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)ih:Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)q':π©f:Fluxesh:q' = qβ’ Multiset.filter (fun p => p.1 = q) (Multiset.replicate f.M.natAbs (q', { M := 1, N := -1 })) +
Multiset.filter (fun p => p.1 = q) (Multiset.replicate (f.M + f.N).natAbs (q', { M := 0, N := 1 })) =
decompose (if q' = q then {(q', f)} else 0) subst h pos π©:Typeinstβ:DecidableEq π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)q':π©f:Fluxesih:Multiset.filter (fun p => p.1 = q') (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q') x)β’ Multiset.filter (fun p => p.1 = q') (Multiset.replicate f.M.natAbs (q', { M := 1, N := -1 })) +
Multiset.filter (fun p => p.1 = q') (Multiset.replicate (f.M + f.N).natAbs (q', { M := 0, N := 1 })) =
decompose (if q' = q' then {(q', f)} else 0)
simp [decompose, decomposeFluxes] pos π©:Typeinstβ:DecidableEq π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)q':π©f:Fluxesih:Multiset.filter (fun p => p.1 = q') (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q') x)β’ Multiset.filter (fun p => p.1 = q') (Multiset.replicate f.M.natAbs (q', { M := 1, N := -1 })) +
Multiset.filter (fun p => p.1 = q') (Multiset.replicate (f.M + f.N).natAbs (q', { M := 0, N := 1 })) =
Multiset.replicate f.M.natAbs (q', { M := 1, N := -1 }) +
Multiset.replicate (f.M + f.N).natAbs (q', { M := 0, N := 1 })
congr pos.e_a π©:Typeinstβ:DecidableEq π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)q':π©f:Fluxesih:Multiset.filter (fun p => p.1 = q') (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q') x)β’ Multiset.filter (fun p => p.1 = q') (Multiset.replicate f.M.natAbs (q', { M := 1, N := -1 })) =
Multiset.replicate f.M.natAbs (q', { M := 1, N := -1 })pos.e_a π©:Typeinstβ:DecidableEq π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)q':π©f:Fluxesih:Multiset.filter (fun p => p.1 = q') (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q') x)β’ Multiset.filter (fun p => p.1 = q') (Multiset.replicate (f.M + f.N).natAbs (q', { M := 0, N := 1 })) =
Multiset.replicate (f.M + f.N).natAbs (q', { M := 0, N := 1 })
all_goals
Β· pos.e_a π©:Typeinstβ:DecidableEq π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)q':π©f:Fluxesih:Multiset.filter (fun p => p.1 = q') (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q') x)β’ Multiset.filter (fun p => p.1 = q') (Multiset.replicate (f.M + f.N).natAbs (q', { M := 0, N := 1 })) =
Multiset.replicate (f.M + f.N).natAbs (q', { M := 0, N := 1 }) refine Multiset.filter_eq_self.mpr ?_ pos.e_a π©:Typeinstβ:DecidableEq π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)q':π©f:Fluxesih:Multiset.filter (fun p => p.1 = q') (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q') x)β’ β a β Multiset.replicate (f.M + f.N).natAbs (q', { M := 0, N := 1 }), a.1 = q'
intro a ha pos.e_a π©:Typeinstβ:DecidableEq π©aβ:π© Γ Fluxesx:Multiset (π© Γ Fluxes)q':π©f:Fluxesih:Multiset.filter (fun p => p.1 = q') (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q') x)a:π© Γ Fluxesha:a β Multiset.replicate (f.M + f.N).natAbs (q', { M := 0, N := 1 })β’ a.1 = q'
simp [Multiset.mem_replicate] at ha pos.e_a π©:Typeinstβ:DecidableEq π©aβ:π© Γ Fluxesx:Multiset (π© Γ Fluxes)q':π©f:Fluxesih:Multiset.filter (fun p => p.1 = q') (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q') x)a:π© Γ Fluxesha:Β¬f.M + f.N = 0 β§ a = (q', { M := 0, N := 1 })β’ a.1 = q'
rw [ha.2 pos.e_a π©:Typeinstβ:DecidableEq π©aβ:π© Γ Fluxesx:Multiset (π© Γ Fluxes)q':π©f:Fluxesih:Multiset.filter (fun p => p.1 = q') (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q') x)a:π© Γ Fluxesha:Β¬f.M = 0 β§ a = (q', { M := 1, N := -1 })β’ (q', { M := 1, N := -1 }).1 = q' All goals completed! π] All goals completed! π
Β· neg π©:Typeinstβ:DecidableEq π©q:π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)ih:Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)q':π©f:Fluxesh:Β¬q' = qβ’ Multiset.filter (fun p => p.1 = q) (Multiset.replicate f.M.natAbs (q', { M := 1, N := -1 })) +
Multiset.filter (fun p => p.1 = q) (Multiset.replicate (f.M + f.N).natAbs (q', { M := 0, N := 1 })) =
decompose (if q' = q then {(q', f)} else 0) simp [h, decompose] neg π©:Typeinstβ:DecidableEq π©q:π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)ih:Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)q':π©f:Fluxesh:Β¬q' = qβ’ (β (a : π©) (b : Fluxes), (a, b) β Multiset.replicate f.M.natAbs (q', { M := 1, N := -1 }) β Β¬a = q) β§
β (a : π©) (b : Fluxes), (a, b) β Multiset.replicate (f.M + f.N).natAbs (q', { M := 0, N := 1 }) β Β¬a = q
apply And.intro neg.left π©:Typeinstβ:DecidableEq π©q:π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)ih:Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)q':π©f:Fluxesh:Β¬q' = qβ’ β (a : π©) (b : Fluxes), (a, b) β Multiset.replicate f.M.natAbs (q', { M := 1, N := -1 }) β Β¬a = qneg.right π©:Typeinstβ:DecidableEq π©q:π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)ih:Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)q':π©f:Fluxesh:Β¬q' = qβ’ β (a : π©) (b : Fluxes), (a, b) β Multiset.replicate (f.M + f.N).natAbs (q', { M := 0, N := 1 }) β Β¬a = q
all_goals
Β· neg.right π©:Typeinstβ:DecidableEq π©q:π©a:π© Γ Fluxesx:Multiset (π© Γ Fluxes)ih:Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)q':π©f:Fluxesh:Β¬q' = qβ’ β (a : π©) (b : Fluxes), (a, b) β Multiset.replicate (f.M + f.N).natAbs (q', { M := 0, N := 1 }) β Β¬a = q intro a b h neg.right π©:Typeinstβ:DecidableEq π©q:π©aβ:π© Γ Fluxesx:Multiset (π© Γ Fluxes)ih:Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)q':π©f:Fluxeshβ:Β¬q' = qa:π©b:Fluxesh:(a, b) β Multiset.replicate (f.M + f.N).natAbs (q', { M := 0, N := 1 })β’ Β¬a = q
simp [Multiset.mem_replicate] at h neg.right π©:Typeinstβ:DecidableEq π©q:π©aβ:π© Γ Fluxesx:Multiset (π© Γ Fluxes)ih:Multiset.filter (fun p => p.1 = q) (x.bind fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
decompose (Multiset.filter (fun p => p.1 = q) x)q':π©f:Fluxeshβ:Β¬q' = qa:π©b:Fluxesh:Β¬f.M + f.N = 0 β§ a = q' β§ b = { M := 0, N := 1 }β’ Β¬a = q
simp_all All goals completed! πC.2.3. Decomposition preserves the charge map
lemma decompose_toChargeMap [DecidableEq π©] (x : FiveQuanta π©)
(hx : x.toFluxesFive β FluxesFive.elemsNoExotics) :
x.decompose.toChargeMap = x.toChargeMap := by π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.decompose.toChargeMap = x.toChargeMap
ext q π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ x.decompose.toChargeMap q = x.toChargeMap q
rw [toChargeMap, π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ (Multiset.map Prod.snd (Multiset.filter (fun p => p.1 = q) x.decompose)).sum = x.toChargeMap q π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ (Multiset.map Prod.snd (decompose (Multiset.filter (fun p => p.1 = q) x))).sum = x.toChargeMap q decompose_filter_charge π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ (Multiset.map Prod.snd (decompose (Multiset.filter (fun p => p.1 = q) x))).sum = x.toChargeMap q π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ (Multiset.map Prod.snd (decompose (Multiset.filter (fun p => p.1 = q) x))).sum = x.toChargeMap q] π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ (Multiset.map Prod.snd (decompose (Multiset.filter (fun p => p.1 = q) x))).sum = x.toChargeMap q
simp [decompose] π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ (Multiset.map Prod.snd
((Multiset.filter (fun p => p.1 = q) x).bind fun p =>
Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2))).sum =
x.toChargeMap q
rw [Multiset.map_bind π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ ((Multiset.filter (fun p => p.1 = q) x).bind fun a =>
Multiset.map Prod.snd (Multiset.map (fun f => (a.1, f)) (decomposeFluxes a.2))).sum =
x.toChargeMap q π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ ((Multiset.filter (fun p => p.1 = q) x).bind fun a =>
Multiset.map Prod.snd (Multiset.map (fun f => (a.1, f)) (decomposeFluxes a.2))).sum =
x.toChargeMap q] π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ ((Multiset.filter (fun p => p.1 = q) x).bind fun a =>
Multiset.map Prod.snd (Multiset.map (fun f => (a.1, f)) (decomposeFluxes a.2))).sum =
x.toChargeMap q
simp only [Multiset.map_map, Function.comp_apply, Multiset.map_id', Multiset.sum_bind] π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ (Multiset.map (fun a => (decomposeFluxes a.2).sum) (Multiset.filter (fun p => p.1 = q) x)).sum = x.toChargeMap q
rw [toChargeMap π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ (Multiset.map (fun a => (decomposeFluxes a.2).sum) (Multiset.filter (fun p => p.1 = q) x)).sum =
(Multiset.map Prod.snd (Multiset.filter (fun p => p.1 = q) x)).sum π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ (Multiset.map (fun a => (decomposeFluxes a.2).sum) (Multiset.filter (fun p => p.1 = q) x)).sum =
(Multiset.map Prod.snd (Multiset.filter (fun p => p.1 = q) x)).sum] π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ (Multiset.map (fun a => (decomposeFluxes a.2).sum) (Multiset.filter (fun p => p.1 = q) x)).sum =
(Multiset.map Prod.snd (Multiset.filter (fun p => p.1 = q) x)).sum
congr 1 π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ Multiset.map (fun a => (decomposeFluxes a.2).sum) (Multiset.filter (fun p => p.1 = q) x) =
Multiset.map Prod.snd (Multiset.filter (fun p => p.1 = q) x)
apply Multiset.map_congr a π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ Multiset.filter (fun p => p.1 = q) x = Multiset.filter (fun p => p.1 = q) xa π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ β x_1 β Multiset.filter (fun p => p.1 = q) x, (decomposeFluxes x_1.2).sum = x_1.2
Β· a π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ Multiset.filter (fun p => p.1 = q) x = Multiset.filter (fun p => p.1 = q) x rfl All goals completed! π
intro a ha a π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©a:π© Γ Fluxesha:a β Multiset.filter (fun p => p.1 = q) xβ’ (decomposeFluxes a.2).sum = a.2
exact decomposeFluxes_sum_of_noExotics a.2
β¨x.toFluxesFive, hx, Multiset.mem_map_of_mem Prod.snd (Multiset.mem_filter.mp ha).1β© All goals completed! πC.2.4. Decomposition preserves the charges
lemma decompose_toCharges_dedup [DecidableEq π©] (x : FiveQuanta π©)
(hx : x.toFluxesFive β FluxesFive.elemsNoExotics) :
x.decompose.toCharges.dedup = x.toCharges.dedup := by π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.decompose.toCharges.dedup = x.toCharges.dedup
refine Multiset.dedup_ext.mpr ?_ π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ β (a : π©), a β x.decompose.toCharges β a β x.toCharges
intro q π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ q β x.decompose.toCharges β q β x.toCharges
simp [decompose, toCharges, -existsAndEq] π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ (β x_1 a b, (a, b) β x β§ x_1 β decomposeFluxes b β§ a = q) β β x_1, (q, x_1) β x
constructor mp π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ (β x_1 a b, (a, b) β x β§ x_1 β decomposeFluxes b β§ a = q) β β x_1, (q, x_1) β xmpr π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ (β x_1, (q, x_1) β x) β β x_1 a b, (a, b) β x β§ x_1 β decomposeFluxes b β§ a = q
Β· mp π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ (β x_1 a b, (a, b) β x β§ x_1 β decomposeFluxes b β§ a = q) β β x_1, (q, x_1) β x rintro β¨a, b, c, h1, h2, rflβ© mp π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsa:Fluxesb:π©c:Fluxesh1:(b, c) β xh2:a β decomposeFluxes cβ’ β x_1, (b, x_1) β x
exact β¨c, h1β© All goals completed! π
Β· mpr π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©β’ (β x_1, (q, x_1) β x) β β x_1 a b, (a, b) β x β§ x_1 β decomposeFluxes b β§ a = q rintro β¨c, h1β© mpr π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©c:Fluxesh1:(q, c) β xβ’ β x_1 a b, (a, b) β x β§ x_1 β decomposeFluxes b β§ a = q
have hn : (decomposeFluxes c) β 0 := by π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.decompose.toCharges.dedup = x.toCharges.dedup mpr π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©c:Fluxesh1:(q, c) β xhn:decomposeFluxes c β 0β’ β x_1 a b, (a, b) β x β§ x_1 β decomposeFluxes b β§ a = q
have c_mem_f : c β x.toFluxesFive := by π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.decompose.toCharges.dedup = x.toCharges.dedup π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©c:Fluxesh1:(q, c) β xc_mem_f:c β x.toFluxesFiveβ’ decomposeFluxes c β 0 mpr π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©c:Fluxesh1:(q, c) β xhn:decomposeFluxes c β 0β’ β x_1 a b, (a, b) β x β§ x_1 β decomposeFluxes b β§ a = q
simp [toFluxesFive] π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©c:Fluxesh1:(q, c) β xβ’ β a, (a, c) β x π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©c:Fluxesh1:(q, c) β xc_mem_f:c β x.toFluxesFiveβ’ decomposeFluxes c β 0mpr π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©c:Fluxesh1:(q, c) β xhn:decomposeFluxes c β 0β’ β x_1 a b, (a, b) β x β§ x_1 β decomposeFluxes b β§ a = q
use q π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©c:Fluxesh1:(q, c) β xc_mem_f:c β x.toFluxesFiveβ’ decomposeFluxes c β 0mpr π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©c:Fluxesh1:(q, c) β xhn:decomposeFluxes c β 0β’ β x_1 a b, (a, b) β x β§ x_1 β decomposeFluxes b β§ a = q π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©c:Fluxesh1:(q, c) β xc_mem_f:c β x.toFluxesFiveβ’ decomposeFluxes c β 0mpr π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©c:Fluxesh1:(q, c) β xhn:decomposeFluxes c β 0β’ β x_1 a b, (a, b) β x β§ x_1 β decomposeFluxes b β§ a = q
generalize x.toFluxesFive = F at * π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©c:Fluxesh1:(q, c) β xF:FluxesFivehx:F β FluxesFive.elemsNoExoticsc_mem_f:c β Fβ’ decomposeFluxes c β 0mpr π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©c:Fluxesh1:(q, c) β xhn:decomposeFluxes c β 0β’ β x_1 a b, (a, b) β x β§ x_1 β decomposeFluxes b β§ a = q
clear h1 π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©c:FluxesF:FluxesFivehx:F β FluxesFive.elemsNoExoticsc_mem_f:c β Fβ’ decomposeFluxes c β 0mpr π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©c:Fluxesh1:(q, c) β xhn:decomposeFluxes c β 0β’ β x_1 a b, (a, b) β x β§ x_1 β decomposeFluxes b β§ a = q
revert c π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©F:FluxesFivehx:F β FluxesFive.elemsNoExoticsβ’ β c β F, decomposeFluxes c β 0mpr π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©c:Fluxesh1:(q, c) β xhn:decomposeFluxes c β 0β’ β x_1 a b, (a, b) β x β§ x_1 β decomposeFluxes b β§ a = q
revert F π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©q:π©β’ β F β FluxesFive.elemsNoExotics, β c β F, decomposeFluxes c β 0mpr π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©c:Fluxesh1:(q, c) β xhn:decomposeFluxes c β 0β’ β x_1 a b, (a, b) β x β§ x_1 β decomposeFluxes b β§ a = q
decidempr π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©c:Fluxesh1:(q, c) β xhn:decomposeFluxes c β 0β’ β x_1 a b, (a, b) β x β§ x_1 β decomposeFluxes b β§ a = qmpr π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©c:Fluxesh1:(q, c) β xhn:decomposeFluxes c β 0β’ β x_1 a b, (a, b) β x β§ x_1 β decomposeFluxes b β§ a = q
apply Multiset.exists_mem_of_ne_zero at hn mpr π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©c:Fluxesh1:(q, c) β xhn:β a, a β decomposeFluxes cβ’ β x_1 a b, (a, b) β x β§ x_1 β decomposeFluxes b β§ a = q
obtain β¨c', hβ© := hn mpr π©:Typeinstβ:DecidableEq π©x:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©c:Fluxesh1:(q, c) β xc':Fluxesh:c' β decomposeFluxes cβ’ β x_1 a b, (a, b) β x β§ x_1 β decomposeFluxes b β§ a = q
use c', q, c All goals completed! πC.2.5. Decomposition preserves the reduction
lemma decompose_reduce (x : FiveQuanta π©) [DecidableEq π©]
(hx : x.toFluxesFive β FluxesFive.elemsNoExotics) :
x.decompose.reduce = x.reduce := by π©:Typex:FiveQuanta π©instβ:DecidableEq π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.decompose.reduce = x.reduce
rw [reduce, π©:Typex:FiveQuanta π©instβ:DecidableEq π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ Multiset.map (fun q5 => (q5, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x.decompose)).sum))
x.decompose.toCharges.dedup =
x.reduce π©:Typex:FiveQuanta π©instβ:DecidableEq π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ Multiset.map (fun q5 => (q5, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x.decompose)).sum))
x.decompose.toCharges.dedup =
Multiset.map (fun q5 => (q5, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum))
x.toCharges.dedup reduce π©:Typex:FiveQuanta π©instβ:DecidableEq π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ Multiset.map (fun q5 => (q5, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x.decompose)).sum))
x.decompose.toCharges.dedup =
Multiset.map (fun q5 => (q5, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum))
x.toCharges.dedup π©:Typex:FiveQuanta π©instβ:DecidableEq π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ Multiset.map (fun q5 => (q5, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x.decompose)).sum))
x.decompose.toCharges.dedup =
Multiset.map (fun q5 => (q5, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum))
x.toCharges.dedup] π©:Typex:FiveQuanta π©instβ:DecidableEq π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ Multiset.map (fun q5 => (q5, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x.decompose)).sum))
x.decompose.toCharges.dedup =
Multiset.map (fun q5 => (q5, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q5) x)).sum))
x.toCharges.dedup
apply Multiset.map_congr a π©:Typex:FiveQuanta π©instβ:DecidableEq π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.decompose.toCharges.dedup = x.toCharges.dedupa π©:Typex:FiveQuanta π©instβ:DecidableEq π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ β x_1 β x.toCharges.dedup,
(x_1, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = x_1) x.decompose)).sum) =
(x_1, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = x_1) x)).sum)
Β· a π©:Typex:FiveQuanta π©instβ:DecidableEq π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.decompose.toCharges.dedup = x.toCharges.dedup rw [decompose_toCharges_dedup x hx a π©:Typex:FiveQuanta π©instβ:DecidableEq π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.toCharges.dedup = x.toCharges.dedup All goals completed! π] All goals completed! π
Β· a π©:Typex:FiveQuanta π©instβ:DecidableEq π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ β x_1 β x.toCharges.dedup,
(x_1, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = x_1) x.decompose)).sum) =
(x_1, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = x_1) x)).sum) intro q hx' a π©:Typex:FiveQuanta π©instβ:DecidableEq π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©hx':q β x.toCharges.dedupβ’ (q, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q) x.decompose)).sum) =
(q, (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q) x)).sum)
simp only [Prod.mk.injEq, true_and] a π©:Typex:FiveQuanta π©instβ:DecidableEq π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsq:π©hx':q β x.toCharges.dedupβ’ (Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q) x.decompose)).sum =
(Multiset.map (fun y => y.2) (Multiset.filter (fun f => f.1 = q) x)).sum
exact congrFun (decompose_toChargeMap x hx) q All goals completed! π
C.2.6. Fluxes of the decomposition of a FiveQuanta
lemma decompose_toFluxesFive (x : FiveQuanta π©)
(hx : x.toFluxesFive β FluxesFive.elemsNoExotics) :
x.decompose.toFluxesFive = {β¨1, -1β©, β¨1, -1β©, β¨1, -1β©, β¨0, 1β©, β¨0, 1β©, β¨0, 1β©} := by π©:Typex:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.decompose.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}
rw [toFluxesFive, π©:Typex:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ Multiset.map Prod.snd x.decompose =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }} π©:Typex:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ Multiset.map Prod.snd (Multiset.bind x fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }} decompose π©:Typex:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ Multiset.map Prod.snd (Multiset.bind x fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }} π©:Typex:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ Multiset.map Prod.snd (Multiset.bind x fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}] π©:Typex:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ Multiset.map Prod.snd (Multiset.bind x fun p => Multiset.map (fun f => (p.1, f)) (decomposeFluxes p.2)) =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}
rw [Multiset.map_bind π©:Typex:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ (Multiset.bind x fun a => Multiset.map Prod.snd (Multiset.map (fun f => (a.1, f)) (decomposeFluxes a.2))) =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }} π©:Typex:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ (Multiset.bind x fun a => Multiset.map Prod.snd (Multiset.map (fun f => (a.1, f)) (decomposeFluxes a.2))) =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}] π©:Typex:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ (Multiset.bind x fun a => Multiset.map Prod.snd (Multiset.map (fun f => (a.1, f)) (decomposeFluxes a.2))) =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}
simp only [Multiset.map_map, Function.comp_apply, Multiset.map_id', Int.reduceNeg,
Multiset.insert_eq_cons] π©:Typex:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ (Multiset.bind x fun a => decomposeFluxes a.2) =
{ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β { M := 1, N := -1 } ::β { M := 0, N := 1 } ::β { M := 0, N := 1 } ::β {{ M := 0, N := 1 }}
trans (Multiset.bind x.toFluxesFive fun a => decomposeFluxes a) π©:Typex:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ (Multiset.bind x fun a => decomposeFluxes a.2) = Multiset.bind x.toFluxesFive fun a => decomposeFluxes aπ©:Typex:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ (Multiset.bind x.toFluxesFive fun a => decomposeFluxes a) =
{ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β { M := 1, N := -1 } ::β { M := 0, N := 1 } ::β { M := 0, N := 1 } ::β {{ M := 0, N := 1 }}
Β· π©:Typex:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ (Multiset.bind x fun a => decomposeFluxes a.2) = Multiset.bind x.toFluxesFive fun a => decomposeFluxes a rw [toFluxesFive, π©:Typex:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ (Multiset.bind x fun a => decomposeFluxes a.2) = (Multiset.map Prod.snd x).bind fun a => decomposeFluxes a All goals completed! π Multiset.bind_map π©:Typex:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ (Multiset.bind x fun a => decomposeFluxes a.2) = Multiset.bind x fun a => decomposeFluxes a.2 All goals completed! π] All goals completed! π
Β· π©:Typex:FiveQuanta π©hx:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ (Multiset.bind x.toFluxesFive fun a => decomposeFluxes a) =
{ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β { M := 1, N := -1 } ::β { M := 0, N := 1 } ::β { M := 0, N := 1 } ::β {{ M := 0, N := 1 }} generalize x.toFluxesFive = F at * π©:Typex:FiveQuanta π©F:FluxesFivehx:F β FluxesFive.elemsNoExoticsβ’ (Multiset.bind F fun a => decomposeFluxes a) =
{ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β { M := 1, N := -1 } ::β { M := 0, N := 1 } ::β { M := 0, N := 1 } ::β {{ M := 0, N := 1 }}
revert F π©:Typex:FiveQuanta π©β’ β F β FluxesFive.elemsNoExotics,
(Multiset.bind F fun a => decomposeFluxes a) =
{ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β { M := 1, N := -1 } ::β { M := 0, N := 1 } ::β { M := 0, N := 1 } ::β {{ M := 0, N := 1 }}
decide All goals completed! π
D. Lifting charges to FiveQuanta
D.1. liftCharge c: multiset of five-quanta for a finite set of charges c with no exotics
This is an efficient definition, we will later show that it gives the correct answer
Given a finite set of charges c the FiveQuanta
which do not have exotics, duplicate charges or zero fluxes, which map down to c.
def liftCharge (c : Finset π©) : Multiset (FiveQuanta π©) :=
/- The multisets of cardinality 3 containing 3 elements of `c`. -/
let S53 : Multiset (Multiset π©) := toMultisetsThree c
/- Pairs of multisets (s1, s2) such that s1 and s2 are cardinality of `3` containing
elements of `c` and that all elements of `c` are in `s1 + s2`. -/
let S5p : Multiset (Multiset π© Γ Multiset π©) :=
(S53 ΓΛ’ S53).filter fun (s1, s2) => c.val β€ s1 + s2
let Fp : Multiset (FiveQuanta π©) :=
S5p.map (fun y => y.1.map (fun z => (z, β¨1, -1β©)) + y.2.map (fun z => (z, β¨0, 1β©)))
Fp.map reduce
D.2. FiveQuanta in liftCharge c have a finite set of charges c
lemma toCharges_toFinset_of_mem_liftCharge (c : Finset π©) {x : FiveQuanta π©}
(h : x β liftCharge c) : x.toCharges.toFinset = c := by π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x β liftCharge cβ’ x.toCharges.toFinset = c
simp [liftCharge] at h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:β a b,
(((a.toFinset β c β§ a.card = 3) β§ b.toFinset β c β§ b.card = 3) β§ c.val β€ a + b) β§
(Multiset.map (fun z => (z, { M := 1, N := -1 })) a + Multiset.map (fun z => (z, { M := 0, N := 1 })) b).reduce = xβ’ x.toCharges.toFinset = c
obtain β¨s1, s2, β¨β¨β¨s1_subset, s1_cardβ©, β¨s2_subset, s2_cardβ©β©, hsumβ©, rflβ© := h π©:Typeinstβ:DecidableEq π©c:Finset π©s1:Multiset π©s2:Multiset π©hsum:c.val β€ s1 + s2s1_subset:s1.toFinset β cs1_card:s1.card = 3s2_subset:s2.toFinset β cs2_card:s2.card = 3β’ (Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 +
Multiset.map (fun z => (z, { M := 0, N := 1 })) s2).reduce.toCharges.toFinset =
c
rw [β Multiset.toFinset_dedup, π©:Typeinstβ:DecidableEq π©c:Finset π©s1:Multiset π©s2:Multiset π©hsum:c.val β€ s1 + s2s1_subset:s1.toFinset β cs1_card:s1.card = 3s2_subset:s2.toFinset β cs2_card:s2.card = 3β’ (Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 +
Multiset.map (fun z => (z, { M := 0, N := 1 })) s2).reduce.toCharges.dedup.toFinset =
c π©:Typeinstβ:DecidableEq π©c:Finset π©s1:Multiset π©s2:Multiset π©hsum:c.val β€ s1 + s2s1_subset:s1.toFinset β cs1_card:s1.card = 3s2_subset:s2.toFinset β cs2_card:s2.card = 3β’ (Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 +
Multiset.map (fun z => (z, { M := 0, N := 1 })) s2).toCharges.dedup.dedup.toFinset =
c reduce_toCharges π©:Typeinstβ:DecidableEq π©c:Finset π©s1:Multiset π©s2:Multiset π©hsum:c.val β€ s1 + s2s1_subset:s1.toFinset β cs1_card:s1.card = 3s2_subset:s2.toFinset β cs2_card:s2.card = 3β’ (Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 +
Multiset.map (fun z => (z, { M := 0, N := 1 })) s2).toCharges.dedup.dedup.toFinset =
c π©:Typeinstβ:DecidableEq π©c:Finset π©s1:Multiset π©s2:Multiset π©hsum:c.val β€ s1 + s2s1_subset:s1.toFinset β cs1_card:s1.card = 3s2_subset:s2.toFinset β cs2_card:s2.card = 3β’ (Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 +
Multiset.map (fun z => (z, { M := 0, N := 1 })) s2).toCharges.dedup.dedup.toFinset =
c] π©:Typeinstβ:DecidableEq π©c:Finset π©s1:Multiset π©s2:Multiset π©hsum:c.val β€ s1 + s2s1_subset:s1.toFinset β cs1_card:s1.card = 3s2_subset:s2.toFinset β cs2_card:s2.card = 3β’ (Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 +
Multiset.map (fun z => (z, { M := 0, N := 1 })) s2).toCharges.dedup.dedup.toFinset =
c
simp only [Int.reduceNeg, Multiset.dedup_idem, Multiset.toFinset_dedup] π©:Typeinstβ:DecidableEq π©c:Finset π©s1:Multiset π©s2:Multiset π©hsum:c.val β€ s1 + s2s1_subset:s1.toFinset β cs1_card:s1.card = 3s2_subset:s2.toFinset β cs2_card:s2.card = 3β’ (Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 +
Multiset.map (fun z => (z, { M := 0, N := 1 })) s2).toCharges.toFinset =
c
simp [toCharges] π©:Typeinstβ:DecidableEq π©c:Finset π©s1:Multiset π©s2:Multiset π©hsum:c.val β€ s1 + s2s1_subset:s1.toFinset β cs1_card:s1.card = 3s2_subset:s2.toFinset β cs2_card:s2.card = 3β’ s1.toFinset βͺ s2.toFinset = c
refine Finset.Subset.antisymm (Finset.union_subset s1_subset s2_subset) fun a ha => ?_ π©:Typeinstβ:DecidableEq π©c:Finset π©s1:Multiset π©s2:Multiset π©hsum:c.val β€ s1 + s2s1_subset:s1.toFinset β cs1_card:s1.card = 3s2_subset:s2.toFinset β cs2_card:s2.card = 3a:π©ha:a β cβ’ a β s1.toFinset βͺ s2.toFinset
simpa using Multiset.mem_of_le hsum ha All goals completed! π
D.3. FiveQuanta in liftCharge c have no duplicate charges
lemma toCharges_nodup_of_mem_liftCharge (c : Finset π©) {x : FiveQuanta π©}
(h : x β liftCharge c) : x.toCharges.Nodup := by π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x β liftCharge cβ’ x.toCharges.Nodup
rw [liftCharge, π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x β
Multiset.map reduce
(Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c)))β’ x.toCharges.Nodup π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:β
a β
Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c)),
a.reduce = xβ’ x.toCharges.Nodup Multiset.mem_map π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:β
a β
Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c)),
a.reduce = xβ’ x.toCharges.Nodup π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:β
a β
Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c)),
a.reduce = xβ’ x.toCharges.Nodup] at h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:β
a β
Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c)),
a.reduce = xβ’ x.toCharges.Nodup
obtain β¨x, h, rflβ© := h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x β
Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c))β’ x.reduce.toCharges.Nodup
simp [reduce_toCharges] All goals completed! π
D.4. Membership in liftCharge c iff is reduction of FiveQuanta with given fluxes
lemma exists_toCharges_toFluxesFive_of_mem_liftCharge (c : Finset π©) {x : FiveQuanta π©}
(h : x β liftCharge c) :
β a : FiveQuanta π©, a.reduce = x β§ a.toCharges.toFinset = c β§ a.toFluxesFive =
{β¨1, -1β©, β¨1, -1β©, β¨1, -1β©, β¨0, 1β©, β¨0, 1β©, β¨0, 1β©} := by π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x β liftCharge cβ’ β a,
a.reduce = x β§
a.toCharges.toFinset = c β§
a.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}
have h' := h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x β liftCharge ch':x β liftCharge cβ’ β a,
a.reduce = x β§
a.toCharges.toFinset = c β§
a.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}
rw [liftCharge, π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x β
Multiset.map reduce
(Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c)))h':x β liftCharge cβ’ β a,
a.reduce = x β§
a.toCharges.toFinset = c β§
a.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }} π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:β
a β
Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c)),
a.reduce = xh':x β liftCharge cβ’ β a,
a.reduce = x β§
a.toCharges.toFinset = c β§
a.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }} Multiset.mem_map π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:β
a β
Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c)),
a.reduce = xh':x β liftCharge cβ’ β a,
a.reduce = x β§
a.toCharges.toFinset = c β§
a.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }} π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:β
a β
Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c)),
a.reduce = xh':x β liftCharge cβ’ β a,
a.reduce = x β§
a.toCharges.toFinset = c β§
a.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}] at h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:β
a β
Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c)),
a.reduce = xh':x β liftCharge cβ’ β a,
a.reduce = x β§
a.toCharges.toFinset = c β§
a.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}
obtain β¨a, h, rflβ© := h π©:Typeinstβ:DecidableEq π©c:Finset π©a:FiveQuanta π©h:a β
Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c))h':a.reduce β liftCharge cβ’ β a_1,
a_1.reduce = a.reduce β§
a_1.toCharges.toFinset = c β§
a_1.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}
use a h π©:Typeinstβ:DecidableEq π©c:Finset π©a:FiveQuanta π©h:a β
Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c))h':a.reduce β liftCharge cβ’ a.reduce = a.reduce β§
a.toCharges.toFinset = c β§
a.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}
simp only [Int.reduceNeg, Multiset.insert_eq_cons, true_and] h π©:Typeinstβ:DecidableEq π©c:Finset π©a:FiveQuanta π©h:a β
Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c))h':a.reduce β liftCharge cβ’ a.toCharges.toFinset = c β§
a.toFluxesFive =
{ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β { M := 1, N := -1 } ::β { M := 0, N := 1 } ::β { M := 0, N := 1 } ::β {{ M := 0, N := 1 }}
apply And.intro h.left π©:Typeinstβ:DecidableEq π©c:Finset π©a:FiveQuanta π©h:a β
Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c))h':a.reduce β liftCharge cβ’ a.toCharges.toFinset = ch.right π©:Typeinstβ:DecidableEq π©c:Finset π©a:FiveQuanta π©h:a β
Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c))h':a.reduce β liftCharge cβ’ a.toFluxesFive =
{ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β { M := 1, N := -1 } ::β { M := 0, N := 1 } ::β { M := 0, N := 1 } ::β {{ M := 0, N := 1 }}
Β· h.left π©:Typeinstβ:DecidableEq π©c:Finset π©a:FiveQuanta π©h:a β
Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c))h':a.reduce β liftCharge cβ’ a.toCharges.toFinset = c simpa [reduce_toCharges] using toCharges_toFinset_of_mem_liftCharge c h' All goals completed! π
Β· h.right π©:Typeinstβ:DecidableEq π©c:Finset π©a:FiveQuanta π©h:a β
Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c))h':a.reduce β liftCharge cβ’ a.toFluxesFive =
{ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β { M := 1, N := -1 } ::β { M := 0, N := 1 } ::β { M := 0, N := 1 } ::β {{ M := 0, N := 1 }} simp at h h.right π©:Typeinstβ:DecidableEq π©c:Finset π©a:FiveQuanta π©h':a.reduce β liftCharge ch:β a_1 b,
(((a_1.toFinset β c β§ a_1.card = 3) β§ b.toFinset β c β§ b.card = 3) β§ c.val β€ a_1 + b) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) a_1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) b = aβ’ a.toFluxesFive =
{ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β { M := 1, N := -1 } ::β { M := 0, N := 1 } ::β { M := 0, N := 1 } ::β {{ M := 0, N := 1 }}
obtain β¨s1, s2, β¨β¨β¨s1_subset, s1_cardβ©, β¨s2_subset, s2_cardβ©β©, hsumβ©, rflβ© := h h.right π©:Typeinstβ:DecidableEq π©c:Finset π©s1:Multiset π©s2:Multiset π©hsum:c.val β€ s1 + s2s1_subset:s1.toFinset β cs1_card:s1.card = 3s2_subset:s2.toFinset β cs2_card:s2.card = 3h':(Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2).reduce β
liftCharge cβ’ (Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 +
Multiset.map (fun z => (z, { M := 0, N := 1 })) s2).toFluxesFive =
{ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β { M := 1, N := -1 } ::β { M := 0, N := 1 } ::β { M := 0, N := 1 } ::β {{ M := 0, N := 1 }}
simp [toFluxesFive, s1_card, s2_card] h.right π©:Typeinstβ:DecidableEq π©c:Finset π©s1:Multiset π©s2:Multiset π©hsum:c.val β€ s1 + s2s1_subset:s1.toFinset β cs1_card:s1.card = 3s2_subset:s2.toFinset β cs2_card:s2.card = 3h':(Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2).reduce β
liftCharge cβ’ { M := 0, N := 1 } ::β
{ M := 0, N := 1 } ::β
{ M := 1, N := -1 } ::β { M := 1, N := -1 } ::β { M := 1, N := -1 } ::β {{ M := 0, N := 1 }} =
{ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β { M := 1, N := -1 } ::β { M := 0, N := 1 } ::β { M := 0, N := 1 } ::β {{ M := 0, N := 1 }}
decide All goals completed! π
lemma mem_liftCharge_of_exists_toCharges_toFluxesFive (c : Finset π©) {x : FiveQuanta π©}
(h : β a : FiveQuanta π©, a.reduce = x β§ a.toCharges.toFinset = c β§ a.toFluxesFive =
{β¨1, -1β©, β¨1, -1β©, β¨1, -1β©, β¨0, 1β©, β¨0, 1β©, β¨0, 1β©}) :
x β liftCharge c := by π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:β a,
a.reduce = x β§
a.toCharges.toFinset = c β§
a.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ x β liftCharge c
obtain β¨x, rfl, h, h2β© := h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ x.reduce β liftCharge c
rw [liftCharge, π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ x.reduce β
Multiset.map reduce
(Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c))) π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ β
a β
Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c)),
a.reduce = x.reduce Multiset.mem_map π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ β
a β
Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c)),
a.reduce = x.reduce π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ β
a β
Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c)),
a.reduce = x.reduce] π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ β
a β
Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c)),
a.reduce = x.reduce
use x h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ x β
Multiset.map
(fun y =>
Multiset.map (fun z => (z, { M := 1, N := -1 })) y.1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) y.2)
(Multiset.filter
(fun x =>
match x with
| (s1, s2) => c.val β€ s1 + s2)
(toMultisetsThree c ΓΛ’ toMultisetsThree c)) β§
x.reduce = x.reduce
simp only [Int.reduceNeg, Multiset.mem_map, Multiset.mem_filter, Multiset.mem_product,
mem_toMultisetsThree_iff, Prod.exists, and_true] h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ β a b,
(((a.toFinset β c β§ a.card = 3) β§ b.toFinset β c β§ b.card = 3) β§ c.val β€ a + b) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) a + Multiset.map (fun z => (z, { M := 0, N := 1 })) b = x
let s1 := (x.filter (fun y => y.2 = β¨1, -1β©)).map Prod.fst h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)β’ β a b,
(((a.toFinset β c β§ a.card = 3) β§ b.toFinset β c β§ b.card = 3) β§ c.val β€ a + b) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) a + Multiset.map (fun z => (z, { M := 0, N := 1 })) b = x
let s2 := (x.filter (fun y => y.2 = β¨0, 1β©)).map Prod.fst h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)β’ β a b,
(((a.toFinset β c β§ a.card = 3) β§ b.toFinset β c β§ b.card = 3) β§ c.val β€ a + b) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) a + Multiset.map (fun z => (z, { M := 0, N := 1 })) b = x
use s1, s2 h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)β’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x
have hcard : β v : Fluxes, (x.filter (fun y => y.2 = v)).card =
(x.toFluxesFive.filter (fun y => y = v)).card := by π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:β a,
a.reduce = x β§
a.toCharges.toFinset = c β§
a.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ x β liftCharge c h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x
intro v π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)v:Fluxesβ’ (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardh π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x
rw [toFluxesFive, π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)v:Fluxesβ’ (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) (Multiset.map Prod.snd x)).card π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)v:Fluxesβ’ (Multiset.filter (fun y => y.2 = v) x).card =
(Multiset.map Prod.snd (Multiset.filter ((fun y => y = v) β Prod.snd) x)).cardh π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x Multiset.filter_map π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)v:Fluxesβ’ (Multiset.filter (fun y => y.2 = v) x).card =
(Multiset.map Prod.snd (Multiset.filter ((fun y => y = v) β Prod.snd) x)).card π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)v:Fluxesβ’ (Multiset.filter (fun y => y.2 = v) x).card =
(Multiset.map Prod.snd (Multiset.filter ((fun y => y = v) β Prod.snd) x)).cardh π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x] π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)v:Fluxesβ’ (Multiset.filter (fun y => y.2 = v) x).card =
(Multiset.map Prod.snd (Multiset.filter ((fun y => y = v) β Prod.snd) x)).cardh π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x
simph π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = xh π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x
have hmap : β v : Fluxes, Multiset.map (fun y => (y.1, v)) (x.filter (fun y => y.2 = v)) =
x.filter (fun y => y.2 = v) := by π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:β a,
a.reduce = x β§
a.toCharges.toFinset = c β§
a.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ x β liftCharge c h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x
intro v π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardv:Fluxesβ’ Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xh π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x
refine (Multiset.map_congr rfl fun y hy => ?_).trans (Multiset.map_id _) π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardv:Fluxesy:π© Γ Fluxeshy:y β Multiset.filter (fun y => y.2 = v) xβ’ (y.1, v) = id yh π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x
simp [β (Multiset.mem_filter.mp hy).2]h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = xh π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x
have hx : Multiset.filter (fun y => y.2 = β¨0, 1β©) x
= Multiset.filter (fun y => Β¬ y.2 = β¨1, -1β©) x := by π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:β a,
a.reduce = x β§
a.toCharges.toFinset = c β§
a.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ x β liftCharge c h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x
refine Multiset.filter_congr ?_ π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xβ’ β x_1 β x, x_1.2 = { M := 0, N := 1 } β Β¬x_1.2 = { M := 1, N := -1 }h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x
intro p hp π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xp:π© Γ Fluxeshp:p β xβ’ p.2 = { M := 0, N := 1 } β Β¬p.2 = { M := 1, N := -1 }h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x
have h1 : p.2 β x.toFluxesFive := by π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:β a,
a.reduce = x β§
a.toCharges.toFinset = c β§
a.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ x β liftCharge c π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xp:π© Γ Fluxeshp:p β xh1:p.2 β x.toFluxesFiveβ’ p.2 = { M := 0, N := 1 } β Β¬p.2 = { M := 1, N := -1 }h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x simp [toFluxesFive] π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xp:π© Γ Fluxeshp:p β xβ’ β a, (a, p.2) β x π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xp:π© Γ Fluxeshp:p β xh1:p.2 β x.toFluxesFiveβ’ p.2 = { M := 0, N := 1 } β Β¬p.2 = { M := 1, N := -1 }h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x; use p.1 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xp:π© Γ Fluxeshp:p β xh1:p.2 β x.toFluxesFiveβ’ p.2 = { M := 0, N := 1 } β Β¬p.2 = { M := 1, N := -1 }h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xp:π© Γ Fluxeshp:p β xh1:p.2 β x.toFluxesFiveβ’ p.2 = { M := 0, N := 1 } β Β¬p.2 = { M := 1, N := -1 }h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x
rw [h2 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xp:π© Γ Fluxeshp:p β xh1:p.2 β
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ p.2 = { M := 0, N := 1 } β Β¬p.2 = { M := 1, N := -1 } π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xp:π© Γ Fluxeshp:p β xh1:p.2 β
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ p.2 = { M := 0, N := 1 } β Β¬p.2 = { M := 1, N := -1 }h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x] at h1 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xp:π© Γ Fluxeshp:p β xh1:p.2 β
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ p.2 = { M := 0, N := 1 } β Β¬p.2 = { M := 1, N := -1 }h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x
simp_all π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = cs1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)p:π© Γ Fluxesh2:x.toFluxesFive =
{ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β { M := 1, N := -1 } ::β { M := 0, N := 1 } ::β { M := 0, N := 1 } ::β {{ M := 0, N := 1 }}hcard:β (v : Fluxes),
(Multiset.filter (fun y => y.2 = v) x).card =
(Multiset.filter (fun y => y = v)
({ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β { M := 0, N := 1 } ::β { M := 0, N := 1 } ::β {{ M := 0, N := 1 }})).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhp:p β xh1:p.2 = { M := 1, N := -1 } β¨ p.2 = { M := 0, N := 1 }β’ p.2 = { M := 0, N := 1 } β Β¬p.2 = { M := 1, N := -1 }h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x
rcases h1 with hp | hp inl π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = cs1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)p:π© Γ Fluxesh2:x.toFluxesFive =
{ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β { M := 1, N := -1 } ::β { M := 0, N := 1 } ::β { M := 0, N := 1 } ::β {{ M := 0, N := 1 }}hcard:β (v : Fluxes),
(Multiset.filter (fun y => y.2 = v) x).card =
(Multiset.filter (fun y => y = v)
({ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β { M := 0, N := 1 } ::β { M := 0, N := 1 } ::β {{ M := 0, N := 1 }})).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhpβ:p β xhp:p.2 = { M := 1, N := -1 }β’ p.2 = { M := 0, N := 1 } β Β¬p.2 = { M := 1, N := -1 }inr π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = cs1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)p:π© Γ Fluxesh2:x.toFluxesFive =
{ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β { M := 1, N := -1 } ::β { M := 0, N := 1 } ::β { M := 0, N := 1 } ::β {{ M := 0, N := 1 }}hcard:β (v : Fluxes),
(Multiset.filter (fun y => y.2 = v) x).card =
(Multiset.filter (fun y => y = v)
({ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β { M := 0, N := 1 } ::β { M := 0, N := 1 } ::β {{ M := 0, N := 1 }})).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhpβ:p β xhp:p.2 = { M := 0, N := 1 }β’ p.2 = { M := 0, N := 1 } β Β¬p.2 = { M := 1, N := -1 }h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x <;> inl π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = cs1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)p:π© Γ Fluxesh2:x.toFluxesFive =
{ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β { M := 1, N := -1 } ::β { M := 0, N := 1 } ::β { M := 0, N := 1 } ::β {{ M := 0, N := 1 }}hcard:β (v : Fluxes),
(Multiset.filter (fun y => y.2 = v) x).card =
(Multiset.filter (fun y => y = v)
({ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β { M := 0, N := 1 } ::β { M := 0, N := 1 } ::β {{ M := 0, N := 1 }})).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhpβ:p β xhp:p.2 = { M := 1, N := -1 }β’ p.2 = { M := 0, N := 1 } β Β¬p.2 = { M := 1, N := -1 }inr π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = cs1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)p:π© Γ Fluxesh2:x.toFluxesFive =
{ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β { M := 1, N := -1 } ::β { M := 0, N := 1 } ::β { M := 0, N := 1 } ::β {{ M := 0, N := 1 }}hcard:β (v : Fluxes),
(Multiset.filter (fun y => y.2 = v) x).card =
(Multiset.filter (fun y => y = v)
({ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β
{ M := 1, N := -1 } ::β { M := 0, N := 1 } ::β { M := 0, N := 1 } ::β {{ M := 0, N := 1 }})).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhpβ:p β xhp:p.2 = { M := 0, N := 1 }β’ p.2 = { M := 0, N := 1 } β Β¬p.2 = { M := 1, N := -1 }h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x simp [hp]h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = xh π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (((s1.toFinset β c β§ s1.card = 3) β§ s2.toFinset β c β§ s2.card = 3) β§ c.val β€ s1 + s2) β§
Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x
refine β¨β¨β¨β¨?_, ?_β©, β¨?_, ?_β©β©, ?_β©, ?_β© h.refine_1 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ s1.toFinset β ch.refine_2 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ s1.card = 3h.refine_3 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ s2.toFinset β ch.refine_4 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ s2.card = 3h.refine_5 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ c.val β€ s1 + s2h.refine_6 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x
Β· h.refine_1 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ s1.toFinset β c simp [s1, β h, toCharges] All goals completed! π
Β· h.refine_2 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ s1.card = 3 simp [s1] h.refine_2 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x).card = 3
rw [hcard β¨1, -1β©, h.refine_2 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (Multiset.filter (fun y => y = { M := 1, N := -1 }) x.toFluxesFive).card = 3 h.refine_2 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (Multiset.filter (fun y => y = { M := 1, N := -1 })
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}).card =
3 h2 h.refine_2 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (Multiset.filter (fun y => y = { M := 1, N := -1 })
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}).card =
3h.refine_2 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (Multiset.filter (fun y => y = { M := 1, N := -1 })
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}).card =
3]h.refine_2 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (Multiset.filter (fun y => y = { M := 1, N := -1 })
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}).card =
3
decide All goals completed! π
Β· h.refine_3 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ s2.toFinset β c simp [s2, β h, toCharges] All goals completed! π
Β· h.refine_4 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ s2.card = 3 simp [s2] h.refine_4 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x).card = 3
rw [hcard β¨0, 1β©, h.refine_4 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (Multiset.filter (fun y => y = { M := 0, N := 1 }) x.toFluxesFive).card = 3 h.refine_4 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (Multiset.filter (fun y => y = { M := 0, N := 1 })
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}).card =
3 h2 h.refine_4 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (Multiset.filter (fun y => y = { M := 0, N := 1 })
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}).card =
3h.refine_4 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (Multiset.filter (fun y => y = { M := 0, N := 1 })
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}).card =
3]h.refine_4 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (Multiset.filter (fun y => y = { M := 0, N := 1 })
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}).card =
3
decide All goals completed! π
Β· h.refine_5 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ c.val β€ s1 + s2 rw [β h h.refine_5 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ x.toCharges.toFinset.val β€ s1 + s2 h.refine_5 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ x.toCharges.toFinset.val β€ s1 + s2]h.refine_5 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ x.toCharges.toFinset.val β€ s1 + s2
simp [s1, s2, toCharges] h.refine_5 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (Multiset.map Prod.fst x).dedup β€
Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x) +
Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)
rw [β Multiset.map_add h.refine_5 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (Multiset.map Prod.fst x).dedup β€
Multiset.map Prod.fst
(Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x + Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x) h.refine_5 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (Multiset.map Prod.fst x).dedup β€
Multiset.map Prod.fst
(Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x + Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)]h.refine_5 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (Multiset.map Prod.fst x).dedup β€
Multiset.map Prod.fst
(Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x + Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)
refine (Multiset.le_iff_subset (Multiset.nodup_dedup (Multiset.map Prod.fst x))).mpr ?_ h.refine_5 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ (Multiset.map Prod.fst x).dedup β
Multiset.map Prod.fst
(Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x + Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)
simp only [Multiset.dedup_subset'] h.refine_5 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ Multiset.map Prod.fst x β
Multiset.map Prod.fst
(Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x + Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)
refine Multiset.map_subset_map ?_ h.refine_5 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ x β Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x + Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x
rw [hx, h.refine_5 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ x β Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x + Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) x h.refine_5 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ x β x Multiset.filter_add_not h.refine_5 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ x β xh.refine_5 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ x β x]h.refine_5 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ x β x
exact fun β¦aβ¦ a => a All goals completed! π
Β· h.refine_6 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ Multiset.map (fun z => (z, { M := 1, N := -1 })) s1 + Multiset.map (fun z => (z, { M := 0, N := 1 })) s2 = x simp [s1, s2] h.refine_6 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ Multiset.map (fun x => (x.1, { M := 1, N := -1 })) (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x) +
Multiset.map (fun x => (x.1, { M := 0, N := 1 })) (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x) =
x
rw [hmap β¨1, -1β©, h.refine_6 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x +
Multiset.map (fun x => (x.1, { M := 0, N := 1 })) (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x) =
x h.refine_6 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x + Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) x = x hmap β¨0, 1β©, h.refine_6 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x + Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = xh.refine_6 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x + Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) x = x hx h.refine_6 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x + Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) x = xh.refine_6 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x + Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) x = x]h.refine_6 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}s1:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x)s2:Multiset π© := Multiset.map Prod.fst (Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x)hcard:β (v : Fluxes), (Multiset.filter (fun y => y.2 = v) x).card = (Multiset.filter (fun y => y = v) x.toFluxesFive).cardhmap:β (v : Fluxes),
Multiset.map (fun y => (y.1, v)) (Multiset.filter (fun y => y.2 = v) x) = Multiset.filter (fun y => y.2 = v) xhx:Multiset.filter (fun y => y.2 = { M := 0, N := 1 }) x = Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) xβ’ Multiset.filter (fun y => y.2 = { M := 1, N := -1 }) x + Multiset.filter (fun y => Β¬y.2 = { M := 1, N := -1 }) x = x
exact Multiset.filter_add_not (fun y => y.2 = β¨1, -1β©) x All goals completed! πlemma mem_liftCharge_iff_exists (c : Finset π©) {x : FiveQuanta π©} :
x β liftCharge c β β a : FiveQuanta π©, a.reduce = x β§
a.toCharges.toFinset = c β§ a.toFluxesFive =
{β¨1, -1β©, β¨1, -1β©, β¨1, -1β©, β¨0, 1β©, β¨0, 1β©, β¨0, 1β©} :=
β¨exists_toCharges_toFluxesFive_of_mem_liftCharge c,
mem_liftCharge_of_exists_toCharges_toFluxesFive cβ©
D.5. FiveQuanta in liftCharge c do not have zero fluxes
lemma hasNoZero_of_mem_liftCharge (c : Finset π©) {x : FiveQuanta π©}
(h : x β liftCharge c) : x.toFluxesFive.HasNoZero := by π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x β liftCharge cβ’ x.toFluxesFive.HasNoZero
rw [mem_liftCharge_iff_exists π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:β a,
a.reduce = x β§
a.toCharges.toFinset = c β§
a.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ x.toFluxesFive.HasNoZero π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:β a,
a.reduce = x β§
a.toCharges.toFinset = c β§
a.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ x.toFluxesFive.HasNoZero] at h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:β a,
a.reduce = x β§
a.toCharges.toFinset = c β§
a.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ x.toFluxesFive.HasNoZero
obtain β¨x, rfl, h1, h2β© := h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ x.reduce.toFluxesFive.HasNoZero
intro hf π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}hf:0 β x.reduce.toFluxesFiveβ’ False
have hx := mem_powerset_sum_of_mem_reduce_toFluxesFive_filter hf π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}hf:0 β x.reduce.toFluxesFivehx:0 β Multiset.map (fun s => s.sum) (Multiset.filter (fun s => s β β
) (Multiset.powerset x.toFluxesFive))β’ False
rw [h2 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}hf:0 β x.reduce.toFluxesFivehx:0 β
Multiset.map (fun s => s.sum)
(Multiset.filter (fun s => s β β
)
(Multiset.powerset
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}))β’ False π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}hf:0 β x.reduce.toFluxesFivehx:0 β
Multiset.map (fun s => s.sum)
(Multiset.filter (fun s => s β β
)
(Multiset.powerset
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}))β’ False] at hx π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}hf:0 β x.reduce.toFluxesFivehx:0 β
Multiset.map (fun s => s.sum)
(Multiset.filter (fun s => s β β
)
(Multiset.powerset
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}))β’ False
revert hx π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}hf:0 β x.reduce.toFluxesFiveβ’ 0 β
Multiset.map (fun s => s.sum)
(Multiset.filter (fun s => s β β
)
(Multiset.powerset
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }})) β
False
decide All goals completed! π
D.6. FiveQuanta in liftCharge c have no exotics
lemma noExotics_of_mem_liftCharge (c : Finset π©) (F : FiveQuanta π©)
(h : F β liftCharge c) :
F.toFluxesFive.NoExotics := by π©:Typeinstβ:DecidableEq π©c:Finset π©F:FiveQuanta π©h:F β liftCharge cβ’ F.toFluxesFive.NoExotics
rw [mem_liftCharge_iff_exists π©:Typeinstβ:DecidableEq π©c:Finset π©F:FiveQuanta π©h:β a,
a.reduce = F β§
a.toCharges.toFinset = c β§
a.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ F.toFluxesFive.NoExotics π©:Typeinstβ:DecidableEq π©c:Finset π©F:FiveQuanta π©h:β a,
a.reduce = F β§
a.toCharges.toFinset = c β§
a.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ F.toFluxesFive.NoExotics] at h π©:Typeinstβ:DecidableEq π©c:Finset π©F:FiveQuanta π©h:β a,
a.reduce = F β§
a.toCharges.toFinset = c β§
a.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ F.toFluxesFive.NoExotics
obtain β¨x, rfl, h1, h2β© := h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ x.reduce.toFluxesFive.NoExotics
apply reduce_noExotics_of_mem_elemsNoExotics π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ x.toFluxesFive β FluxesFive.elemsNoExotics
rw [h2 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ {{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }} β
FluxesFive.elemsNoExotics π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ {{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }} β
FluxesFive.elemsNoExotics] π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toCharges.toFinset = ch2:x.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}β’ {{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }} β
FluxesFive.elemsNoExotics
decide All goals completed! π
D.7. Membership in liftCharge c iff have no exotics, no zero fluxes, and charges c
lemma mem_liftCharge_of_mem_noExotics_hasNoZero (c : Finset π©) {x : FiveQuanta π©}
(h1 : x.toFluxesFive.NoExotics) (h2 : x.toFluxesFive.HasNoZero)
(h3 : x.toCharges.toFinset = c) (h4 : x.toCharges.Nodup) :
x β liftCharge c := by π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Nodupβ’ x β liftCharge c
have hf : x.toFluxesFive β FluxesFive.elemsNoExotics :=
(FluxesFive.noExotics_iff_mem_elemsNoExotics _).mp β¨h1, h2β© π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x β liftCharge c
rw [mem_liftCharge_iff_exists π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ β a,
a.reduce = x β§
a.toCharges.toFinset = c β§
a.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }} π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ β a,
a.reduce = x β§
a.toCharges.toFinset = c β§
a.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}] π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ β a,
a.reduce = x β§
a.toCharges.toFinset = c β§
a.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}
use x.decompose h π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.decompose.reduce = x β§
x.decompose.toCharges.toFinset = c β§
x.decompose.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}
apply And.intro h.left π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.decompose.reduce = xh.right π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.decompose.toCharges.toFinset = c β§
x.decompose.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}
Β· h.left π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.decompose.reduce = x rw [decompose_reduce x hf h.left π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.reduce = x h.left π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.reduce = x]h.left π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.reduce = x
exact reduce_eq_self_of_ofCharges_nodup x h4 All goals completed! π
Β· h.right π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.decompose.toCharges.toFinset = c β§
x.decompose.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }} constructor h.right.left π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.decompose.toCharges.toFinset = ch.right.right π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.decompose.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }}
Β· h.right.left π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.decompose.toCharges.toFinset = c trans x.decompose.toCharges.dedup.toFinset π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.decompose.toCharges.toFinset = x.decompose.toCharges.dedup.toFinsetπ©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.decompose.toCharges.dedup.toFinset = c
Β· π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.decompose.toCharges.toFinset = x.decompose.toCharges.dedup.toFinset simp All goals completed! π
Β· π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.decompose.toCharges.dedup.toFinset = c rw [decompose_toCharges_dedup x hf, π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.toCharges.dedup.toFinset = c π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.toCharges.dedup.toFinset = x.toCharges.toFinset β h3 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.toCharges.dedup.toFinset = x.toCharges.toFinset π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.toCharges.dedup.toFinset = x.toCharges.toFinset] π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.toCharges.dedup.toFinset = x.toCharges.toFinset
simp All goals completed! π
Β· h.right.right π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ x.decompose.toFluxesFive =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }} rw [decompose_toFluxesFive x hf h.right.right π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExoticsh2:x.toFluxesFive.HasNoZeroh3:x.toCharges.toFinset = ch4:x.toCharges.Noduphf:x.toFluxesFive β FluxesFive.elemsNoExoticsβ’ {{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }} =
{{ M := 1, N := -1 }, { M := 1, N := -1 }, { M := 1, N := -1 }, { M := 0, N := 1 }, { M := 0, N := 1 },
{ M := 0, N := 1 }} All goals completed! π] All goals completed! π
lemma mem_liftCharge_iff (c : Finset π©) (x : FiveQuanta π©) :
x β liftCharge c β x.toFluxesFive β FluxesFive.elemsNoExotics
β§ x.toCharges.toFinset = c β§ x.toCharges.Nodup := by π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©β’ x β liftCharge c β x.toFluxesFive β FluxesFive.elemsNoExotics β§ x.toCharges.toFinset = c β§ x.toCharges.Nodup
constructor mp π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©β’ x β liftCharge c β x.toFluxesFive β FluxesFive.elemsNoExotics β§ x.toCharges.toFinset = c β§ x.toCharges.Nodupmpr π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©β’ x.toFluxesFive β FluxesFive.elemsNoExotics β§ x.toCharges.toFinset = c β§ x.toCharges.Nodup β x β liftCharge c
Β· mp π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©β’ x β liftCharge c β x.toFluxesFive β FluxesFive.elemsNoExotics β§ x.toCharges.toFinset = c β§ x.toCharges.Nodup intro h mp π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x β liftCharge cβ’ x.toFluxesFive β FluxesFive.elemsNoExotics β§ x.toCharges.toFinset = c β§ x.toCharges.Nodup
refine β¨?_, ?_, ?_β© mp.refine_1 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x β liftCharge cβ’ x.toFluxesFive β FluxesFive.elemsNoExoticsmp.refine_2 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x β liftCharge cβ’ x.toCharges.toFinset = cmp.refine_3 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x β liftCharge cβ’ x.toCharges.Nodup
Β· mp.refine_1 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x β liftCharge cβ’ x.toFluxesFive β FluxesFive.elemsNoExotics rw [β FluxesFive.noExotics_iff_mem_elemsNoExotics mp.refine_1 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x β liftCharge cβ’ x.toFluxesFive.NoExotics β§ x.toFluxesFive.HasNoZero mp.refine_1 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x β liftCharge cβ’ x.toFluxesFive.NoExotics β§ x.toFluxesFive.HasNoZero] mp.refine_1 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x β liftCharge cβ’ x.toFluxesFive.NoExotics β§ x.toFluxesFive.HasNoZero
exact β¨noExotics_of_mem_liftCharge c x h, hasNoZero_of_mem_liftCharge c hβ© All goals completed! π
Β· mp.refine_2 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x β liftCharge cβ’ x.toCharges.toFinset = c exact toCharges_toFinset_of_mem_liftCharge c h All goals completed! π
Β· mp.refine_3 π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h:x β liftCharge cβ’ x.toCharges.Nodup exact toCharges_nodup_of_mem_liftCharge c h All goals completed! π
Β· mpr π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©β’ x.toFluxesFive β FluxesFive.elemsNoExotics β§ x.toCharges.toFinset = c β§ x.toCharges.Nodup β x β liftCharge c intro β¨h1, h2, h3β© mpr π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive β FluxesFive.elemsNoExoticsh2:x.toCharges.toFinset = ch3:x.toCharges.Nodupβ’ x β liftCharge c
rw [β FluxesFive.noExotics_iff_mem_elemsNoExotics mpr π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExotics β§ x.toFluxesFive.HasNoZeroh2:x.toCharges.toFinset = ch3:x.toCharges.Nodupβ’ x β liftCharge c mpr π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExotics β§ x.toFluxesFive.HasNoZeroh2:x.toCharges.toFinset = ch3:x.toCharges.Nodupβ’ x β liftCharge c] at h1mpr π©:Typeinstβ:DecidableEq π©c:Finset π©x:FiveQuanta π©h1:x.toFluxesFive.NoExotics β§ x.toFluxesFive.HasNoZeroh2:x.toCharges.toFinset = ch3:x.toCharges.Nodupβ’ x β liftCharge c
exact mem_liftCharge_of_mem_noExotics_hasNoZero c h1.1 h1.2 h2 h3 All goals completed! π
D.8. liftCharge c is preserved under a map if reduced
lemma map_liftCharge {π© π©1 : Type}[DecidableEq π©] [DecidableEq π©1] [CommRing π©] [CommRing π©1]
(f : π© β+* π©1) (c : Finset π©) (F : FiveQuanta π©) (h : F β liftCharge c) :
FiveQuanta.reduce (F.map fun y => (f y.1, y.2)) β liftCharge (c.image f) := by π©:Typeπ©1:TypeinstβΒ³:DecidableEq π©instβΒ²:DecidableEq π©1instβΒΉ:CommRing π©instβ:CommRing π©1f:π© β+* π©1c:Finset π©F:FiveQuanta π©h:F β liftCharge cβ’ reduce (Multiset.map (fun y => (f y.1, y.2)) F) β liftCharge (Finset.image (βf) c)
rw [mem_liftCharge_iff π©:Typeπ©1:TypeinstβΒ³:DecidableEq π©instβΒ²:DecidableEq π©1instβΒΉ:CommRing π©instβ:CommRing π©1f:π© β+* π©1c:Finset π©F:FiveQuanta π©h:F.toFluxesFive β FluxesFive.elemsNoExotics β§ F.toCharges.toFinset = c β§ F.toCharges.Nodupβ’ (reduce (Multiset.map (fun y => (f y.1, y.2)) F)).toFluxesFive β FluxesFive.elemsNoExotics β§
(reduce (Multiset.map (fun y => (f y.1, y.2)) F)).toCharges.toFinset = Finset.image (βf) c β§
(reduce (Multiset.map (fun y => (f y.1, y.2)) F)).toCharges.Nodup π©:Typeπ©1:TypeinstβΒ³:DecidableEq π©instβΒ²:DecidableEq π©1instβΒΉ:CommRing π©instβ:CommRing π©1f:π© β+* π©1c:Finset π©F:FiveQuanta π©h:F.toFluxesFive β FluxesFive.elemsNoExotics β§ F.toCharges.toFinset = c β§ F.toCharges.Nodupβ’ (reduce (Multiset.map (fun y => (f y.1, y.2)) F)).toFluxesFive β FluxesFive.elemsNoExotics β§
(reduce (Multiset.map (fun y => (f y.1, y.2)) F)).toCharges.toFinset = Finset.image (βf) c β§
(reduce (Multiset.map (fun y => (f y.1, y.2)) F)).toCharges.Nodup] at h β’ π©:Typeπ©1:TypeinstβΒ³:DecidableEq π©instβΒ²:DecidableEq π©1instβΒΉ:CommRing π©instβ:CommRing π©1f:π© β+* π©1c:Finset π©F:FiveQuanta π©h:F.toFluxesFive β FluxesFive.elemsNoExotics β§ F.toCharges.toFinset = c β§ F.toCharges.Nodupβ’ (reduce (Multiset.map (fun y => (f y.1, y.2)) F)).toFluxesFive β FluxesFive.elemsNoExotics β§
(reduce (Multiset.map (fun y => (f y.1, y.2)) F)).toCharges.toFinset = Finset.image (βf) c β§
(reduce (Multiset.map (fun y => (f y.1, y.2)) F)).toCharges.Nodup
refine β¨?_, ?_, ?_β© refine_1 π©:Typeπ©1:TypeinstβΒ³:DecidableEq π©instβΒ²:DecidableEq π©1instβΒΉ:CommRing π©instβ:CommRing π©1f:π© β+* π©1c:Finset π©F:FiveQuanta π©h:F.toFluxesFive β FluxesFive.elemsNoExotics β§ F.toCharges.toFinset = c β§ F.toCharges.Nodupβ’ (reduce (Multiset.map (fun y => (f y.1, y.2)) F)).toFluxesFive β FluxesFive.elemsNoExoticsrefine_2 π©:Typeπ©1:TypeinstβΒ³:DecidableEq π©instβΒ²:DecidableEq π©1instβΒΉ:CommRing π©instβ:CommRing π©1f:π© β+* π©1c:Finset π©F:FiveQuanta π©h:F.toFluxesFive β FluxesFive.elemsNoExotics β§ F.toCharges.toFinset = c β§ F.toCharges.Nodupβ’ (reduce (Multiset.map (fun y => (f y.1, y.2)) F)).toCharges.toFinset = Finset.image (βf) crefine_3 π©:Typeπ©1:TypeinstβΒ³:DecidableEq π©instβΒ²:DecidableEq π©1instβΒΉ:CommRing π©instβ:CommRing π©1f:π© β+* π©1c:Finset π©F:FiveQuanta π©h:F.toFluxesFive β FluxesFive.elemsNoExotics β§ F.toCharges.toFinset = c β§ F.toCharges.Nodupβ’ (reduce (Multiset.map (fun y => (f y.1, y.2)) F)).toCharges.Nodup
Β· refine_1 π©:Typeπ©1:TypeinstβΒ³:DecidableEq π©instβΒ²:DecidableEq π©1instβΒΉ:CommRing π©instβ:CommRing π©1f:π© β+* π©1c:Finset π©F:FiveQuanta π©h:F.toFluxesFive β FluxesFive.elemsNoExotics β§ F.toCharges.toFinset = c β§ F.toCharges.Nodupβ’ (reduce (Multiset.map (fun y => (f y.1, y.2)) F)).toFluxesFive β FluxesFive.elemsNoExotics apply reduce_mem_elemsNoExotics refine_1 π©:Typeπ©1:TypeinstβΒ³:DecidableEq π©instβΒ²:DecidableEq π©1instβΒΉ:CommRing π©instβ:CommRing π©1f:π© β+* π©1c:Finset π©F:FiveQuanta π©h:F.toFluxesFive β FluxesFive.elemsNoExotics β§ F.toCharges.toFinset = c β§ F.toCharges.Nodupβ’ toFluxesFive (Multiset.map (fun y => (f y.1, y.2)) F) β FluxesFive.elemsNoExotics
simpa [toFluxesFive, Multiset.map_map] using h.1 All goals completed! π
Β· refine_2 π©:Typeπ©1:TypeinstβΒ³:DecidableEq π©instβΒ²:DecidableEq π©1instβΒΉ:CommRing π©instβ:CommRing π©1f:π© β+* π©1c:Finset π©F:FiveQuanta π©h:F.toFluxesFive β FluxesFive.elemsNoExotics β§ F.toCharges.toFinset = c β§ F.toCharges.Nodupβ’ (reduce (Multiset.map (fun y => (f y.1, y.2)) F)).toCharges.toFinset = Finset.image (βf) c rw [reduce_toCharges refine_2 π©:Typeπ©1:TypeinstβΒ³:DecidableEq π©instβΒ²:DecidableEq π©1instβΒΉ:CommRing π©instβ:CommRing π©1f:π© β+* π©1c:Finset π©F:FiveQuanta π©h:F.toFluxesFive β FluxesFive.elemsNoExotics β§ F.toCharges.toFinset = c β§ F.toCharges.Nodupβ’ (toCharges (Multiset.map (fun y => (f y.1, y.2)) F)).dedup.toFinset = Finset.image (βf) c refine_2 π©:Typeπ©1:TypeinstβΒ³:DecidableEq π©instβΒ²:DecidableEq π©1instβΒΉ:CommRing π©instβ:CommRing π©1f:π© β+* π©1c:Finset π©F:FiveQuanta π©h:F.toFluxesFive β FluxesFive.elemsNoExotics β§ F.toCharges.toFinset = c β§ F.toCharges.Nodupβ’ (toCharges (Multiset.map (fun y => (f y.1, y.2)) F)).dedup.toFinset = Finset.image (βf) c]refine_2 π©:Typeπ©1:TypeinstβΒ³:DecidableEq π©instβΒ²:DecidableEq π©1instβΒΉ:CommRing π©instβ:CommRing π©1f:π© β+* π©1c:Finset π©F:FiveQuanta π©h:F.toFluxesFive β FluxesFive.elemsNoExotics β§ F.toCharges.toFinset = c β§ F.toCharges.Nodupβ’ (toCharges (Multiset.map (fun y => (f y.1, y.2)) F)).dedup.toFinset = Finset.image (βf) c
simp [β h.2.1, β Multiset.toFinset_map, toCharges] All goals completed! π
Β· refine_3 π©:Typeπ©1:TypeinstβΒ³:DecidableEq π©instβΒ²:DecidableEq π©1instβΒΉ:CommRing π©instβ:CommRing π©1f:π© β+* π©1c:Finset π©F:FiveQuanta π©h:F.toFluxesFive β FluxesFive.elemsNoExotics β§ F.toCharges.toFinset = c β§ F.toCharges.Nodupβ’ (reduce (Multiset.map (fun y => (f y.1, y.2)) F)).toCharges.Nodup simp [reduce_toCharges] All goals completed! πE. Anomaly cancellation coefficients
E.1. Anomaly coefficients of a FiveQuanta
The anomaly coefficient of a FiveQuanta is given by the pair of integers:
(βα΅’ qα΅’ Nα΅’, βα΅’ qα΅’Β² Nα΅’).
The first components is for the mixed U(1)-MSSM, see equation (22) of arXiv:1401.5084. The second component is for the mixed U(1)Y-U(1)-U(1) gauge anomaly, see equation (23) of arXiv:1401.5084.
def anomalyCoefficient (F : FiveQuanta π©) : π© Γ π© :=
((F.map fun x => x.2.2 β’ x.1).sum, (F.map fun x => x.2.2 β’ (x.1 * x.1)).sum)E.2. Anomaly coefficients under a map
@[simp]
lemma anomalyCoefficient_of_map {π© π©1 : Type} [CommRing π©] [CommRing π©1]
(f : π© β+* π©1) (F : FiveQuanta π©) :
FiveQuanta.anomalyCoefficient (F.map fun y => (f y.1, y.2) : FiveQuanta π©1) =
(f.prodMap f) F.anomalyCoefficient := by π©:Typeπ©1:TypeinstβΒΉ:CommRing π©instβ:CommRing π©1f:π© β+* π©1F:FiveQuanta π©β’ anomalyCoefficient (Multiset.map (fun y => (f y.1, y.2)) F) = (f.prodMap f) F.anomalyCoefficient
simp [FiveQuanta.anomalyCoefficient, map_multiset_sum, Multiset.map_map] All goals completed! π
E.3. Anomaly coefficients is preserved under reduce
lemma anomalyCoefficient_of_reduce (F : FiveQuanta π©) [DecidableEq π©] :
F.reduce.anomalyCoefficient = F.anomalyCoefficient := by π©:TypeinstβΒΉ:CommRing π©F:FiveQuanta π©instβ:DecidableEq π©β’ F.reduce.anomalyCoefficient = F.anomalyCoefficient
have reduce_sum_N_mul_eq : β h : π© β π©, (F.reduce.map fun x => (x.2.N : π©) * h x.1).sum =
(F.map fun x => (x.2.N : π©) * h x.1).sum := by
intro h π©:TypeinstβΒΉ:CommRing π©F:FiveQuanta π©instβ:DecidableEq π©h:π© β π©β’ (Multiset.map (fun x => βx.2.N * h x.1) F.reduce).sum = (Multiset.map (fun x => βx.2.N * h x.1) F).sum π©:TypeinstβΒΉ:CommRing π©F:FiveQuanta π©instβ:DecidableEq π©reduce_sum_N_mul_eq:β (h : π© β π©), (Multiset.map (fun x => βx.2.N * h x.1) F.reduce).sum = (Multiset.map (fun x => βx.2.N * h x.1) F).sumβ’ F.reduce.anomalyCoefficient = F.anomalyCoefficient
let f : π© β Fluxes β+ π© := fun q5 =>
{ toFun := fun x => x.N β’ h q5
map_zero' := by π©:TypeinstβΒΉ:CommRing π©F:FiveQuanta π©instβ:DecidableEq π©h:π© β π©q5:π©β’ Fluxes.N 0 β’ h q5 = 0 π©:TypeinstβΒΉ:CommRing π©F:FiveQuanta π©instβ:DecidableEq π©h:π© β π©f:π© β Fluxes β+ π© := fun q5 => { toFun := fun x => x.N β’ h q5, map_zero' := β―, map_add' := β― }β’ (Multiset.map (fun x => βx.2.N * h x.1) F.reduce).sum = (Multiset.map (fun x => βx.2.N * h x.1) F).sum π©:TypeinstβΒΉ:CommRing π©F:FiveQuanta π©instβ:DecidableEq π©reduce_sum_N_mul_eq:β (h : π© β π©), (Multiset.map (fun x => βx.2.N * h x.1) F.reduce).sum = (Multiset.map (fun x => βx.2.N * h x.1) F).sumβ’ F.reduce.anomalyCoefficient = F.anomalyCoefficient simp All goals completed! π π©:TypeinstβΒΉ:CommRing π©F:FiveQuanta π©instβ:DecidableEq π©h:π© β π©f:π© β Fluxes β+ π© := fun q5 => { toFun := fun x => x.N β’ h q5, map_zero' := β―, map_add' := β― }β’ (Multiset.map (fun x => βx.2.N * h x.1) F.reduce).sum = (Multiset.map (fun x => βx.2.N * h x.1) F).sum π©:TypeinstβΒΉ:CommRing π©F:FiveQuanta π©instβ:DecidableEq π©reduce_sum_N_mul_eq:β (h : π© β π©), (Multiset.map (fun x => βx.2.N * h x.1) F.reduce).sum = (Multiset.map (fun x => βx.2.N * h x.1) F).sumβ’ F.reduce.anomalyCoefficient = F.anomalyCoefficient
map_add' := by π©:TypeinstβΒΉ:CommRing π©F:FiveQuanta π©instβ:DecidableEq π©h:π© β π©q5:π©β’ β (x y : Fluxes), (x + y).N β’ h q5 = x.N β’ h q5 + y.N β’ h q5 π©:TypeinstβΒΉ:CommRing π©F:FiveQuanta π©instβ:DecidableEq π©h:π© β π©f:π© β Fluxes β+ π© := fun q5 => { toFun := fun x => x.N β’ h q5, map_zero' := β―, map_add' := β― }β’ (Multiset.map (fun x => βx.2.N * h x.1) F.reduce).sum = (Multiset.map (fun x => βx.2.N * h x.1) F).sum π©:TypeinstβΒΉ:CommRing π©F:FiveQuanta π©instβ:DecidableEq π©reduce_sum_N_mul_eq:β (h : π© β π©), (Multiset.map (fun x => βx.2.N * h x.1) F.reduce).sum = (Multiset.map (fun x => βx.2.N * h x.1) F).sumβ’ F.reduce.anomalyCoefficient = F.anomalyCoefficient
intros x y π©:TypeinstβΒΉ:CommRing π©F:FiveQuanta π©instβ:DecidableEq π©h:π© β π©q5:π©x:Fluxesy:Fluxesβ’ (x + y).N β’ h q5 = x.N β’ h q5 + y.N β’ h q5 π©:TypeinstβΒΉ:CommRing π©F:FiveQuanta π©instβ:DecidableEq π©h:π© β π©f:π© β Fluxes β+ π© := fun q5 => { toFun := fun x => x.N β’ h q5, map_zero' := β―, map_add' := β― }β’ (Multiset.map (fun x => βx.2.N * h x.1) F.reduce).sum = (Multiset.map (fun x => βx.2.N * h x.1) F).sum π©:TypeinstβΒΉ:CommRing π©F:FiveQuanta π©instβ:DecidableEq π©reduce_sum_N_mul_eq:β (h : π© β π©), (Multiset.map (fun x => βx.2.N * h x.1) F.reduce).sum = (Multiset.map (fun x => βx.2.N * h x.1) F).sumβ’ F.reduce.anomalyCoefficient = F.anomalyCoefficient
simp [add_mul] All goals completed! π π©:TypeinstβΒΉ:CommRing π©F:FiveQuanta π©instβ:DecidableEq π©h:π© β π©f:π© β Fluxes β+ π© := fun q5 => { toFun := fun x => x.N β’ h q5, map_zero' := β―, map_add' := β― }β’ (Multiset.map (fun x => βx.2.N * h x.1) F.reduce).sum = (Multiset.map (fun x => βx.2.N * h x.1) F).sum π©:TypeinstβΒΉ:CommRing π©F:FiveQuanta π©instβ:DecidableEq π©reduce_sum_N_mul_eq:β (h : π© β π©), (Multiset.map (fun x => βx.2.N * h x.1) F.reduce).sum = (Multiset.map (fun x => βx.2.N * h x.1) F).sumβ’ F.reduce.anomalyCoefficient = F.anomalyCoefficient } π©:TypeinstβΒΉ:CommRing π©F:FiveQuanta π©instβ:DecidableEq π©h:π© β π©f:π© β Fluxes β+ π© := fun q5 => { toFun := fun x => x.N β’ h q5, map_zero' := β―, map_add' := β― }β’ (Multiset.map (fun x => βx.2.N * h x.1) F.reduce).sum = (Multiset.map (fun x => βx.2.N * h x.1) F).sum π©:TypeinstβΒΉ:CommRing π©F:FiveQuanta π©instβ:DecidableEq π©reduce_sum_N_mul_eq:β (h : π© β π©), (Multiset.map (fun x => βx.2.N * h x.1) F.reduce).sum = (Multiset.map (fun x => βx.2.N * h x.1) F).sumβ’ F.reduce.anomalyCoefficient = F.anomalyCoefficient
simpa [f] using reduce_sum_eq_sum_toCharges F f π©:TypeinstβΒΉ:CommRing π©F:FiveQuanta π©instβ:DecidableEq π©reduce_sum_N_mul_eq:β (h : π© β π©), (Multiset.map (fun x => βx.2.N * h x.1) F.reduce).sum = (Multiset.map (fun x => βx.2.N * h x.1) F).sumβ’ F.reduce.anomalyCoefficient = F.anomalyCoefficient π©:TypeinstβΒΉ:CommRing π©F:FiveQuanta π©instβ:DecidableEq π©reduce_sum_N_mul_eq:β (h : π© β π©), (Multiset.map (fun x => βx.2.N * h x.1) F.reduce).sum = (Multiset.map (fun x => βx.2.N * h x.1) F).sumβ’ F.reduce.anomalyCoefficient = F.anomalyCoefficient
simp [anomalyCoefficient] π©:TypeinstβΒΉ:CommRing π©F:FiveQuanta π©instβ:DecidableEq π©reduce_sum_N_mul_eq:β (h : π© β π©), (Multiset.map (fun x => βx.2.N * h x.1) F.reduce).sum = (Multiset.map (fun x => βx.2.N * h x.1) F).sumβ’ (Multiset.map (fun x => βx.2.N * x.1) F.reduce).sum = (Multiset.map (fun x => βx.2.N * x.1) F).sum β§
(Multiset.map (fun x => βx.2.N * (x.1 * x.1)) F.reduce).sum = (Multiset.map (fun x => βx.2.N * (x.1 * x.1)) F).sum
exact β¨reduce_sum_N_mul_eq fun q => q, reduce_sum_N_mul_eq fun q => q * qβ© All goals completed! π