Frozen pin and key records with nominal column budgets
Lax342547.JoinedRecords · concepts/Lax342547/JoinedRecords.lean · lax-342547
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Lemma
Joined pin/key spaces have total dimension bounded by the original pin rank plus the key rank. Unary pairings with their known images cost only nominal columns times that rank, and determine all frozen cross entries. The concrete coordinate count is linear in n.
Concept map
Evidence
This concept declares 7 statements. Each proof establishes one of them relative to its assumptions.
1 basis_records_cross_agreement proven
2 basis_vectors_span proven
3 coordinate_linear_budget proven
4 joined_rank_budget proven
5 joined_record_bound proven
6 joined_record_count proven
7 nominal_column_count proven
Lean source view on GitHub
| 1 | import Lax342547.FrozenRecords |
| 2 | import Lax342547.RawQueryImages |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: Frozen pin and key records with nominal column budgets |
| 7 | type: lemma |
| 8 | --- |
| 9 | Joined pin/key spaces have total dimension bounded by the original pin rank plus the key rank. Unary pairings with their known images cost only nominal columns times that rank, and determine all frozen cross entries. The concrete coordinate count is linear in n. |
| 10 | -/ |
| 11 | |
| 12 | namespace Lax342547.JoinedRecords |
| 13 | |
| 14 | open Lax342547.MomentSpace Lax342547.ExactPins Lax342547.FrozenRecords |
| 15 | open Lax342547.ConcreteGeometry Lax342547.TagGeometry |
| 16 | |
| 17 | noncomputable def joined {Axis I N : Type} {U : Axis → Type} |
| 18 | [∀ a, AddCommGroup (U a)] [∀ a, Module Binary (U a)] |
| 19 | (P : Pin Axis I N) (keys : ∀ a, U a →ₗ[Binary] (I → Binary)) (a : Axis) : |
| 20 | Submodule Binary (I → Binary) := P.space a ⊔ LinearMap.range (keys a) |
| 21 | |
| 22 | axiom joined_rank_budget {Axis I N : Type} {U : Axis → Type} |
| 23 | [Fintype Axis] [Fintype I] |
| 24 | [∀ a, AddCommGroup (U a)] [∀ a, Module Binary (U a)] [∀ a, FiniteDimensional Binary (U a)] |
| 25 | (P : Pin Axis I N) (keys : ∀ a, U a →ₗ[Binary] (I → Binary)) : |
| 26 | (∑ a, Module.finrank Binary (joined P keys a)) ≤ P.rank + ∑ a, Module.finrank Binary (U a) |
| 27 | |
| 28 | abbrev RecordType (Axis I : Type) (dims : Axis → ℕ) (Status : Type) := |
| 29 | (∀ a, Matrix I (Fin (dims a)) Binary) × Status |
| 30 | |
| 31 | axiom joined_record_count {Axis I Status : Type} |
| 32 | [Fintype Axis] [Fintype I] [Fintype Status] (dims : Axis → ℕ) : by |
| 33 | classical |
| 34 | exact Fintype.card (RecordType Axis I dims Status) = 2 ^ (Fintype.card I * ∑ a, dims a) * Fintype.card Status |
| 35 | |
| 36 | axiom joined_record_bound {Axis I N Status : Type} {U : Axis → Type} |
| 37 | [Fintype Axis] [Fintype I] [Fintype Status] |
| 38 | [∀ a, AddCommGroup (U a)] [∀ a, Module Binary (U a)] [∀ a, FiniteDimensional Binary (U a)] |
| 39 | (P : Pin Axis I N) (keys : ∀ a, U a →ₗ[Binary] (I → Binary)) |
| 40 | (K k s : ℕ) (hP : P.rank ≤ K) (hkeys : (∑ a, Module.finrank Binary (U a)) ≤ k) |
| 41 | (hstatus : Fintype.card Status ≤ 2^s) : by |
| 42 | classical |
| 43 | exact Fintype.card (RecordType Axis I (fun a => Module.finrank Binary (joined P keys a)) Status) ≤ |
| 44 | 2 ^ (Fintype.card I * (K+k) + s) |
| 45 | |
| 46 | axiom nominal_column_count {B H : Type} [Fintype B] [Fintype H] : |
| 47 | Fintype.card (Fin 2 × (B ⊕ H)) = 2 * (Fintype.card B + Fintype.card H) |
| 48 | |
| 49 | axiom coordinate_linear_budget (k n b degree : ℕ) (hn : 1 ≤ n) : |
| 50 | Fintype.card (Coordinate k n b degree) ≤ |
| 51 | Fintype.card (SelectorCoordinates b degree) * (Fintype.card (Tag k)^2 + 4) * n |
| 52 | |
| 53 | noncomputable def basisVectors {I : Type} [Fintype I] |
| 54 | (S : Submodule Binary (I → Binary)) : Fin (Module.finrank Binary S) → I → Binary := |
| 55 | fun i => (Module.finBasis Binary S i).val |
| 56 | |
| 57 | axiom basis_vectors_span {I : Type} [Fintype I] |
| 58 | (S : Submodule Binary (I → Binary)) : Submodule.span Binary (Set.range (basisVectors S)) = S |
| 59 | |
| 60 | axiom basis_records_cross_agreement {I N : Type} [Fintype I] [Fintype N] |
| 61 | (D E : Submodule Binary (I → Binary)) |
| 62 | (A A' B B' : (I → Binary) →ₗ[Binary] (N → Binary)) |
| 63 | (leftImages : Fin (Module.finrank Binary D) → N → Binary) |
| 64 | (rightImages : Fin (Module.finrank Binary E) → N → Binary) |
| 65 | (hleft : ∀ x, A (basisVectors D x) = leftImages x ∧ A' (basisVectors D x) = leftImages x) |
| 66 | (hright : ∀ y, B (basisVectors E y) = rightImages y ∧ B' (basisVectors E y) = rightImages y) |
| 67 | (hrecA : record A rightImages = record A' rightImages) |
| 68 | (hrecB : record B leftImages = record B' leftImages) : |
| 69 | (∀ v ∈ D, ∀ w, dotProduct (A v) (B w) = dotProduct (A' v) (B' w)) ∧ |
| 70 | (∀ v w, w ∈ E → dotProduct (A v) (B w) = dotProduct (A' v) (B' w)) |
| 71 | |
| 72 | end Lax342547.JoinedRecords |
| 73 |
Used by
From Mathlib
none
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments