Skip to content

Commit 4586e6a

Browse files
committed
chore(LinearAlgebra/ExteriorPower/Basis): avoid use of IsWellFounded.wellOrderExtension (#37078)
This file formerly used `IsWellFounded.wellOrderExtension` on an empty relation to create a linear order extending it, i.e. an arbitrary linear order. But we can accomplish this directly via the well-ordering principle.
1 parent 5dba9c8 commit 4586e6a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Mathlib/LinearAlgebra/ExteriorPower/Basis.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ module
77

88
public import Mathlib.LinearAlgebra.ExteriorPower.Basic
99
public import Mathlib.LinearAlgebra.ExteriorPower.Pairing
10-
public import Mathlib.Order.Extension.Well
1110
public import Mathlib.RingTheory.Finiteness.Subalgebra
1211
public import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition
1312

@@ -149,19 +148,20 @@ lemma basis_repr {I : Type*} [LinearOrder I] (b : Basis I R M) (s : powersetCard
149148
/-! ### Freeness and dimension of `⋀[R]^n M`. -/
150149

151150
/-- If `M` is a free module, then so is its `n`th exterior power. -/
152-
instance instFree [Module.Free R M] : Module.Free R (⋀[R]^n M) :=
151+
instance instFree [Module.Free R M] : Module.Free R (⋀[R]^n M) := by
152+
classical
153153
have ⟨I, b⟩ := Module.Free.exists_basis R M
154-
letI : LinearOrder I := IsWellFounded.wellOrderExtension emptyWf.rel
155-
Module.Free.of_basis (b.exteriorPower n)
154+
letI : LinearOrder I := linearOrderOfSTO WellOrderingRel
155+
exact Module.Free.of_basis (b.exteriorPower n)
156156

157157
variable [Nontrivial R]
158158

159159
/-- If `R` is non-trivial and `M` is finite free of rank `r`, then
160160
the `n`th exterior power of `M` is of finrank `Nat.choose r n`. -/
161161
lemma finrank_eq [Module.Free R M] [Module.Finite R M] :
162162
Module.finrank R (⋀[R]^n M) = Nat.choose (Module.finrank R M) n := by
163-
letI : LinearOrder (Module.Free.ChooseBasisIndex R M) :=
164-
IsWellFounded.wellOrderExtension emptyWf.rel
163+
classical
164+
let : LinearOrder (Module.Free.ChooseBasisIndex R M) := linearOrderOfSTO WellOrderingRel
165165
let B := (Module.Free.chooseBasis R M).exteriorPower n
166166
rw [Module.finrank_eq_card_basis (Module.Free.chooseBasis R M), Module.finrank_eq_card_basis B,
167167
Fintype.card_eq_nat_card, powersetCard.card, Fintype.card_eq_nat_card]

0 commit comments

Comments
 (0)