Exact image pins in nominal coefficient spaces
Lax342547.ExactPins · concepts/Lax342547/ExactPins.lean · lax-342547
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Lemma
A pin stores a subspace at each component/sign and the prescribed linear image on that subspace. New rank is the sum of dimensions of the tested spaces in the quotients by the old pins, before any frame is applied.
Concept map
Evidence
Lean source view on GitHub
| 1 | import Lax342547.MomentSpace |
| 2 | import Mathlib.LinearAlgebra.Matrix.Rank |
| 3 | import Mathlib.LinearAlgebra.Isomorphisms |
| 4 | |
| 5 | /-! |
| 6 | --- |
| 7 | title: Exact image pins in nominal coefficient spaces |
| 8 | type: lemma |
| 9 | --- |
| 10 | A pin stores a subspace at each component/sign and the prescribed linear |
| 11 | image on that subspace. New rank is the sum of dimensions of the tested |
| 12 | spaces in the quotients by the old pins, before any frame is applied. |
| 13 | -/ |
| 14 | |
| 15 | namespace Lax342547.ExactPins |
| 16 | |
| 17 | open Lax342547.MomentSpace |
| 18 | |
| 19 | def Pin (Axis I N : Type) := |
| 20 | Σ S : Axis → Submodule Binary (I → Binary), ∀ a, S a →ₗ[Binary] (N → Binary) |
| 21 | |
| 22 | namespace Pin |
| 23 | |
| 24 | variable {Axis I N : Type} |
| 25 | |
| 26 | def space (P : Pin Axis I N) (a : Axis) : Submodule Binary (I → Binary) := P.1 a |
| 27 | def value (P : Pin Axis I N) (a : Axis) : P.space a →ₗ[Binary] (N → Binary) := P.2 a |
| 28 | |
| 29 | def empty : Pin Axis I N := ⟨fun _ => ⊥, fun _ => 0⟩ |
| 30 | |
| 31 | def Extends (P Q : Pin Axis I N) : Prop := |
| 32 | ∃ h : ∀ a, P.space a ≤ Q.space a, |
| 33 | ∀ a (v : P.space a), Q.value a ⟨v.val, h a v.property⟩ = P.value a v |
| 34 | |
| 35 | noncomputable def rank [Fintype Axis] (P : Pin Axis I N) : ℕ := |
| 36 | ∑ a, Module.finrank Binary (P.space a) |
| 37 | |
| 38 | noncomputable def relativeRank [Fintype Axis] (P Q : Pin Axis I N) : ℕ := |
| 39 | ∑ a, Module.finrank Binary ((Q.space a).map (P.space a).mkQ) |
| 40 | |
| 41 | def event {Ω : Type} (A : Ω → Axis → (I → Binary) →ₗ[Binary] (N → Binary)) |
| 42 | (P : Pin Axis I N) : Set Ω := |
| 43 | {o | ∀ a (v : P.space a), A o a v.val = P.value a v} |
| 44 | |
| 45 | def joinAt {Ω : Type} (A : Ω → Axis → (I → Binary) →ₗ[Binary] (N → Binary)) |
| 46 | (P Q : Pin Axis I N) (o : Ω) : Pin Axis I N := |
| 47 | ⟨fun a => P.space a ⊔ Q.space a, |
| 48 | fun a => (A o a).comp (P.space a ⊔ Q.space a).subtype⟩ |
| 49 | |
| 50 | noncomputable def basisMatrix [Fintype I] (P : Pin Axis I N) (a : Axis) : |
| 51 | Matrix I (Fin (Module.finrank Binary (P.space a))) Binary := |
| 52 | fun i j => (Module.finBasis Binary (P.space a) j).val i |
| 53 | |
| 54 | noncomputable def basisImage [Fintype I] (P : Pin Axis I N) (a : Axis) : |
| 55 | Matrix N (Fin (Module.finrank Binary (P.space a))) Binary := |
| 56 | fun n j => P.value a (Module.finBasis Binary (P.space a) j) n |
| 57 | |
| 58 | end Pin |
| 59 | |
| 60 | noncomputable instance {Axis I N : Type} [Fintype Axis] [Fintype I] [Fintype N] : |
| 61 | Fintype (Pin Axis I N) := by |
| 62 | classical |
| 63 | let : Finite (Submodule Binary (I → Binary)) := |
| 64 | Finite.of_injective (fun S : Submodule Binary (I → Binary) => (S : Set (I → Binary))) SetLike.coe_injective |
| 65 | let : ∀ S : Submodule Binary (I → Binary), Finite (S →ₗ[Binary] (N → Binary)) := |
| 66 | fun S => Finite.of_injective (fun f : S →ₗ[Binary] (N → Binary) => (f : S → N → Binary)) DFunLike.coe_injective |
| 67 | exact Fintype.ofFinite (Σ S : Axis → Submodule Binary (I → Binary), ∀ a, S a →ₗ[Binary] (N → Binary)) |
| 68 | |
| 69 | axiom event_refinement {Ω Axis I N : Type} |
| 70 | (A : Ω → Axis → (I → Binary) →ₗ[Binary] (N → Binary)) (P Q : Pin Axis I N) |
| 71 | (o : Ω) (ho : o ∈ P.event A ∩ Q.event A) : |
| 72 | P.Extends (P.joinAt A Q o) ∧ Q.Extends (P.joinAt A Q o) ∧ |
| 73 | (P.joinAt A Q o).event A = P.event A ∩ Q.event A |
| 74 | |
| 75 | axiom rank_refinement {Ω Axis I N : Type} [Fintype Axis] [Fintype I] |
| 76 | (A : Ω → Axis → (I → Binary) →ₗ[Binary] (N → Binary)) (P Q : Pin Axis I N) (o : Ω) : |
| 77 | (P.joinAt A Q o).rank = P.rank + P.relativeRank Q |
| 78 | |
| 79 | axiom rank_mono {Axis I N : Type} [Fintype Axis] [Fintype I] |
| 80 | (P Q : Pin Axis I N) (h : P.Extends Q) : P.rank ≤ Q.rank |
| 81 | |
| 82 | axiom basis_rank {Axis I N : Type} [Fintype I] (P : Pin Axis I N) (a : Axis) : |
| 83 | (P.basisMatrix a).rank = Module.finrank Binary (P.space a) |
| 84 | |
| 85 | axiom event_basis {Ω Axis I N : Type} [Fintype I] |
| 86 | (A : Ω → Axis → Matrix N I Binary) (P : Pin Axis I N) : |
| 87 | P.event (fun o a => (A o a).mulVecLin) = |
| 88 | {o | ∀ a, A o a * P.basisMatrix a = P.basisImage a} |
| 89 | |
| 90 | end Lax342547.ExactPins |
| 91 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments