From 21b2e3dd981072dceba18cdaa5d950f2ae31b470 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Tue, 23 Jun 2026 11:49:45 -0500 Subject: [PATCH] Rename longest_chain to longestChain for convention --- lean/Spa/Isomorphism.lean | 10 +++++----- lean/Spa/Lattice.lean | 4 ++-- lean/Spa/Lattice/AboveBelow.lean | 2 +- lean/Spa/Lattice/Prod.lean | 16 ++++++++-------- lean/Spa/Lattice/Unit.lean | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lean/Spa/Isomorphism.lean b/lean/Spa/Isomorphism.lean index 161a8bd..ed15ba8 100644 --- a/lean/Spa/Isomorphism.lean +++ b/lean/Spa/Isomorphism.lean @@ -13,13 +13,13 @@ def FiniteHeightLattice.transport {α β : Type*} [Lattice α] [Lattice β] bot := f ⊥ top := f ⊤ height := I.height - longest_chain := + longestChain := { series := - I.longest_chain.series.map f + I.longestChain.series.map f (hf.strictMono_of_injective (Function.LeftInverse.injective hgf)) - head_series := congrArg f I.longest_chain.head_series - last_series := congrArg f I.longest_chain.last_series - length_series := I.longest_chain.length_series } + head_series := congrArg f I.longestChain.head_series + last_series := congrArg f I.longestChain.last_series + length_series := I.longestChain.length_series } chains_bounded := fun c => I.chains_bounded (c.map g (hg.strictMono_of_injective (Function.LeftInverse.injective hfg))) diff --git a/lean/Spa/Lattice.lean b/lean/Spa/Lattice.lean index d3d67d3..1ed2cdf 100644 --- a/lean/Spa/Lattice.lean +++ b/lean/Spa/Lattice.lean @@ -58,7 +58,7 @@ structure PointedLTSeries (α : Type*) (f t : α)(n : ℕ) [Preorder α] where class FiniteHeightLattice (α : Type*) [Lattice α] extends Bot α, Top α where height : ℕ - longest_chain : PointedLTSeries α ⊥ ⊤ height + longestChain : PointedLTSeries α ⊥ ⊤ height chains_bounded : BoundedChains α height namespace FixedHeight @@ -70,7 +70,7 @@ theorem bot_le [FiniteHeightLattice α] : ∀ (a : α), ⊥ ≤ a := by by_cases heq : ⊥ ⊓ a = ⊥ · exact inf_eq_left.mp heq · exfalso - have lc := FiniteHeightLattice.longest_chain (α := α) + have lc := FiniteHeightLattice.longestChain (α := α) have hlt : ⊥ ⊓ a < lc.series.head := by rw [lc.head_series] exact lt_of_le_of_ne inf_le_left heq diff --git a/lean/Spa/Lattice/AboveBelow.lean b/lean/Spa/Lattice/AboveBelow.lean index ca425ed..737bfd8 100644 --- a/lean/Spa/Lattice/AboveBelow.lean +++ b/lean/Spa/Lattice/AboveBelow.lean @@ -273,7 +273,7 @@ instance [Inhabited α] : FiniteHeightLattice (AboveBelow α) where bot := bot top := top height := 2 - longest_chain := + longestChain := { series := ((RelSeries.singleton _ bot).snoc (mk default) (by rw [RelSeries.last_singleton]; exact bot_lt_mk default)).snoc top diff --git a/lean/Spa/Lattice/Prod.lean b/lean/Spa/Lattice/Prod.lean index f4f2ba6..454f2f9 100644 --- a/lean/Spa/Lattice/Prod.lean +++ b/lean/Spa/Lattice/Prod.lean @@ -68,25 +68,25 @@ instance prod [A : FiniteHeightLattice α] [B : FiniteHeightLattice β] : bot := ((⊥ : α), (⊥ : β)) top := ((⊤ : α), (⊤ : β)) height := A.height + B.height - longest_chain := + longestChain := { series := RelSeries.smash - (A.longest_chain.series.map (fun a => (a, (⊥ : β))) + (A.longestChain.series.map (fun a => (a, (⊥ : β))) (fun _ _ h => Prod.mk_lt_mk_iff_left.mpr h)) - (B.longest_chain.series.map (fun b => ((⊤ : α), b)) + (B.longestChain.series.map (fun b => ((⊤ : α), b)) (fun _ _ h => Prod.mk_lt_mk_iff_right.mpr h)) - (by simp [A.longest_chain.last_series, B.longest_chain.head_series]) + (by simp [A.longestChain.last_series, B.longestChain.head_series]) head_series := (RelSeries.head_smash _).trans ((LTSeries.head_map _ _ _).trans - (congrArg (·, (⊥ : β)) A.longest_chain.head_series)) + (congrArg (·, (⊥ : β)) A.longestChain.head_series)) last_series := (RelSeries.last_smash _).trans ((LTSeries.last_map _ _ _).trans - (congrArg ((⊤ : α), ·) B.longest_chain.last_series)) + (congrArg ((⊤ : α), ·) B.longestChain.last_series)) length_series := by - show A.longest_chain.series.length + B.longest_chain.series.length = _ - rw [A.longest_chain.length_series, B.longest_chain.length_series] } + show A.longestChain.series.length + B.longestChain.series.length = _ + rw [A.longestChain.length_series, B.longestChain.length_series] } chains_bounded := fun c => by obtain ⟨c₁, c₂, -, -, -, -, hlen⟩ := LTSeries.exists_unzip c have h₁ := A.chains_bounded c₁ diff --git a/lean/Spa/Lattice/Unit.lean b/lean/Spa/Lattice/Unit.lean index 7aa48cf..8567c2f 100644 --- a/lean/Spa/Lattice/Unit.lean +++ b/lean/Spa/Lattice/Unit.lean @@ -22,7 +22,7 @@ instance : FiniteHeightLattice PUnit where bot := PUnit.unit top := PUnit.unit height := 0 - longest_chain := { series := RelSeries.singleton _ PUnit.unit, head_series := refl _, last_series := refl _, length_series := refl _ } + longestChain := { series := RelSeries.singleton _ PUnit.unit, head_series := refl _, last_series := refl _, length_series := refl _ } chains_bounded := boundedChains_of_subsingleton PUnit 0 end Spa