FormalConjecturesForMathlib/Geometry/Metric.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1
9 declarations, 0 contain sorry, 0 declared as axioms
Imports (8)
Imported by 2 files
- def
unitDistNumThe number of pairs of points of a finite setsin a metric space that are distance 1 apart line 35 sourceSource documentation
The number of pairs of points of a finite set
sin a metric space that are distance 1 apart.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
MetricSpace,Finset,NatProof uses:
Finset.card,Sym2,Finset.filter,Eq,Real,Dist.dist,Prod.fst,Quot.out,Prod,Sym2.Rel,Prod.snd,OfNat.ofNat,Finset.sym25 instances, coercions and auxiliary constants left out.
noncomputable def unitDistNum (s : Finset X) : ℕ := #{p ∈ s.sym2 | dist p.out.1 p.out.2 = 1} - def
distanceSetThe set of distances determined by a finite set of points in a metric space line 38 sourceSource documentation
The set of distances determined by a finite set of points in a metric space.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
MetricSpace,Finset,RealProof uses:
Finset.image,Prod,Dist.dist,Prod.fst,Prod.snd,Finset.offDiag3 instances, coercions and auxiliary constants left out.
noncomputable def distanceSet (points : Finset X) : Finset ℝ := …
- def
distinctDistancesGiven a finite set of points in a metric space, we define the number of distinct distances between pairs of points line 45 sourceSource documentation
Given a finite set of points in a metric space, we define the number of distinct distances between pairs of points.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
MetricSpace,Finset,NatProof uses:
Finset.card,Real, distanceSetnoncomputable def distinctDistances (points : Finset X) : ℕ := …
- def
minimalDistinctDistancesThe minimum number of distinct distances determined by a set ofnpoints inXline 50 sourceSource documentation
The minimum number of distinct distances determined by a set of
npoints inX.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
MetricSpace,NatProof uses:
InfSet.sInf,Set.ofPred,Exists,Finset,And,Eq,Finset.card, distinctDistances1 instances, coercions and auxiliary constants left out.
noncomputable def minimalDistinctDistances (n : ℕ) : ℕ := …
- def
distanceMultiplicityThe multiplicity of the distanceddetermined bypoints, that is, the number of unordered pairs of distinct points at distancedapart line 55 sourceSource documentation
The multiplicity of the distance
ddetermined bypoints, that is, the number of unordered pairs of distinct points at distancedapart.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
MetricSpace,Finset,Real,NatProof uses:
HDiv.hDiv,Finset.card,Prod,Finset.filter,Eq,Dist.dist,Prod.fst,Prod.snd,Finset.offDiag,OfNat.ofNat6 instances, coercions and auxiliary constants left out.
noncomputable def distanceMultiplicity (points : Finset X) (d : ℝ) : ℕ := …
- def
distinctDistancesFromGiven a finite set of points in a metric space, we define the number of distinct distances between a given point and all other points line 61 sourceSource documentation
Given a finite set of points in a metric space, we define the number of distinct distances between a given point and all other points.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
MetricSpace,Finset,NatProof uses:
Finset.card,Real,Finset.image,Dist.dist,Finset.erase,Classical.propDecidable,Eq3 instances, coercions and auxiliary constants left out.
noncomputable def distinctDistancesFrom (points : Finset X) (pt : X) : ℕ := …
- theorem
unitDistNum_le_choose_twoThe number of unit-distance pairs of a finite set ofnpoints is at most $\binom{n}{2}$, the total number of unordered pairs of distinct points line 67 sourceSource documentation
The number of unit-distance pairs of a finite set of
npoints is at most $\binom{n}{2}$, the total number of unordered pairs of distinct points.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
MetricSpace,Finset,LE.le,Nat, unitDistNum,Nat.choose,Finset.card,OfNat.ofNatProof uses:
Eq.mpr,Sym2,Finset.filter,Eq,Real,Dist.dist,Prod.fst,Quot.out,Prod,Sym2.Rel,Prod.snd,Finset.sym2,id,congrArg,unitDistNum.eq_1,Finset.image,Classical.propDecidable,Function.uncurry,Sym2.mk,Finset.offDiagand 26 more31 instances, coercions and auxiliary constants left out.
Tactic trace: 11 steps
Open to load the checked before-and-after goal states.
theorem unitDistNum_le_choose_two (s : Finset X) : unitDistNum s ≤ (#s).choose 2 := by …
Mentions: unitDistNum
- theorem
even_card_offDiag_filter_dist_eqThe ordered pairs of distinct points ofpointsat distancedcome in swapped pairs, so there are evenly many of them line 80 sourceSource documentation
The ordered pairs of distinct points of
pointsat distancedcome in swapped pairs, so there are evenly many of them.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
MetricSpace,Finset,Real,Even,Nat,Finset.card,Prod,Finset.filter,Eq,Dist.dist,Prod.fst,Prod.snd,Finset.offDiagProof uses:
Eq.mpr,id,congrArg,rfl,ZMod,OfNat.ofNat,Eq.symm,propext,ZMod.natCast_eq_zero_iff_even,Finset.sum,Finset.sum_involution,Membership.mem,Prod.swap,of_decide_eq_true,HAdd.hAdd,Bool,Decidable.decide,Bool.true,Eq.refl,Neand 20 more46 instances, coercions and auxiliary constants left out.
Tactic trace: 16 steps
Open to load the checked before-and-after goal states.
theorem even_card_offDiag_filter_dist_eq (points : Finset X) (d : ℝ) : Even #(points.offDiag.filter fun (pair : X × X) => dist pair.1 pair.2 = d) := by … - theorem
sum_distanceMultiplicityThe multiplicities of the distances determined bypointsadd up to the number of unordered pairs of distinct points line 99 sourceSource documentation
The multiplicities of the distances determined by
pointsadd up to the number of unordered pairs of distinct points.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
MetricSpace,Finset,Eq,Nat,Finset.sum,Real, distanceSet, distanceMultiplicity,Nat.choose,Finset.card,OfNat.ofNatProof uses:
id,Finset.image,Prod,Dist.dist,Prod.fst,Prod.snd,Finset.offDiag,Eq.mpr,HDiv.hDiv,Finset.filter,congrArg,Eq.symm,Nat.sum_div,Membership.mem,Iff.mp,Even,Dvd.dvd,even_iff_two_dvd, even_card_offDiag_filter_dist_eq,Finset.card_eq_sum_card_imageand 19 more41 instances, coercions and auxiliary constants left out.
Tactic trace: 7 steps
Open to load the checked before-and-after goal states.
theorem sum_distanceMultiplicity (points : Finset X) : ∑ d ∈ distanceSet points, distanceMultiplicity points d = (#points).choose 2 := by …Mentions: distanceSet, distanceMultiplicity