Skip to content

Commit 3d210e2

Browse files
committed
feat(LinearAlgebra/Basis/MulOpposite): basis of an opposite space (#25949)
This adds the definition of `Basis.mulOpposite` and shows finite-dimensionality and freeness of `Hᵐᵒᵖ`. For motivation, see #25951. Co-authored-by: themathqueen <23701951+themathqueen@users.noreply.github.com>
1 parent cf3686c commit 3d210e2

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3966,6 +3966,7 @@ import Mathlib.LinearAlgebra.Basis.Defs
39663966
import Mathlib.LinearAlgebra.Basis.Exact
39673967
import Mathlib.LinearAlgebra.Basis.Fin
39683968
import Mathlib.LinearAlgebra.Basis.Flag
3969+
import Mathlib.LinearAlgebra.Basis.MulOpposite
39693970
import Mathlib.LinearAlgebra.Basis.Prod
39703971
import Mathlib.LinearAlgebra.Basis.SMul
39713972
import Mathlib.LinearAlgebra.Basis.Submodule
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/-
2+
Copyright (c) 2025 Monica Omar. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Monica Omar
5+
-/
6+
import Mathlib.LinearAlgebra.FiniteDimensional.Defs
7+
8+
/-!
9+
# Basis of an opposite space
10+
11+
This file defines the basis of an opposite space and shows
12+
that the opposite space is finite-dimensional and free when the original space is.
13+
-/
14+
15+
variable {R H : Type*}
16+
17+
namespace Basis
18+
19+
open MulOpposite
20+
21+
variable {ι : Type*} [Semiring R] [AddCommMonoid H] [Module R H]
22+
23+
/-- The multiplicative opposite of a basis: `b.mulOpposite i ↦ op (b i)`. -/
24+
noncomputable def mulOpposite (b : Basis ι R H) : Basis ι R Hᵐᵒᵖ :=
25+
b.map (opLinearEquiv R)
26+
27+
@[simp]
28+
theorem mulOpposite_apply (b : Basis ι R H) (i : ι) :
29+
b.mulOpposite i = op (b i) := rfl
30+
31+
theorem mulOpposite_repr_eq (b : Basis ι R H) :
32+
b.mulOpposite.repr = (opLinearEquiv R).symm.trans b.repr := rfl
33+
34+
@[simp]
35+
theorem repr_unop_eq_mulOpposite_repr (b : Basis ι R H) (x : Hᵐᵒᵖ) :
36+
b.repr (unop x) = b.mulOpposite.repr x := rfl
37+
38+
@[simp]
39+
theorem mulOpposite_repr_op (b : Basis ι R H) (x : H) :
40+
b.mulOpposite.repr (op x) = b.repr x := rfl
41+
42+
end Basis
43+
44+
namespace MulOpposite
45+
46+
instance [DivisionRing R] [AddCommGroup H] [Module R H]
47+
[FiniteDimensional R H] : FiniteDimensional R Hᵐᵒᵖ := FiniteDimensional.of_finite_basis
48+
(Basis.ofVectorSpace R H).mulOpposite (Basis.ofVectorSpaceIndex R H).toFinite
49+
50+
instance [Semiring R] [AddCommMonoid H] [Module R H]
51+
[Module.Free R H] : Module.Free R Hᵐᵒᵖ :=
52+
let ⟨b⟩ := Module.Free.exists_basis (R := R) (M := H)
53+
Module.Free.of_basis b.2.mulOpposite
54+
55+
theorem rank [Semiring R] [StrongRankCondition R] [AddCommMonoid H] [Module R H]
56+
[Module.Free R H] : Module.rank R Hᵐᵒᵖ = Module.rank R H :=
57+
LinearEquiv.nonempty_equiv_iff_rank_eq.mp ⟨(opLinearEquiv R).symm⟩
58+
59+
theorem finrank [DivisionRing R] [AddCommGroup H] [Module R H] :
60+
Module.finrank R Hᵐᵒᵖ = Module.finrank R H := by
61+
let b := Basis.ofVectorSpace R H
62+
rw [Module.finrank_eq_nat_card_basis b, Module.finrank_eq_nat_card_basis b.mulOpposite]
63+
64+
end MulOpposite

0 commit comments

Comments
 (0)