|
| 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