pith. machine review for the scientific record. sign in

IndisputableMonolith.Mathematics.LinearAlgebraFromRS

IndisputableMonolith/Mathematics/LinearAlgebraFromRS.lean · 48 lines · 8 declarations

show as:
view math explainer →

open module explainer GitHub source

Explainer status: pending

   1import Mathlib
   2
   3/-!
   4# Linear Algebra from RS — C Mathematics
   5
   6The recognition lattice has a natural linear algebra structure.
   7Key: the D=3 recognition space = ℝ³, with:
   8- dim = 3 = D
   9- basis vectors: 3 (= D)
  10- orthogonal complement: 3 (= D)
  11
  12Five canonical linear algebra operations (addition, scalar multiplication,
  13inner product, outer product, tensor product) = configDim D = 5.
  14
  15The D=3 lattice Q₃ = F₂³ is a 3-dimensional vector space over F₂.
  16|F₂³| = 2³ = 8 = recognition period.
  17
  18Lean: dim = 3 = D, |F₂³| = 8 = 2³.
  19
  20Lean status: 0 sorry, 0 axiom.
  21-/
  22
  23namespace IndisputableMonolith.Mathematics.LinearAlgebraFromRS
  24
  25inductive LinearAlgebraOp where
  26  | addition | scalarMul | innerProduct | outerProduct | tensorProduct
  27  deriving DecidableEq, Repr, BEq, Fintype
  28
  29theorem linearAlgebraOpCount : Fintype.card LinearAlgebraOp = 5 := by decide
  30
  31def rsDimension : ℕ := 3  -- D = 3
  32def f2CubeSize : ℕ := 2 ^ rsDimension
  33
  34theorem rsDimension_eq_3 : rsDimension = 3 := rfl
  35theorem f2CubeSize_eq_8 : f2CubeSize = 8 := by decide
  36
  37structure LinearAlgebraCert where
  38  five_ops : Fintype.card LinearAlgebraOp = 5
  39  dimension_3 : rsDimension = 3
  40  f2cube_8 : f2CubeSize = 8
  41
  42def linearAlgebraCert : LinearAlgebraCert where
  43  five_ops := linearAlgebraOpCount
  44  dimension_3 := rsDimension_eq_3
  45  f2cube_8 := f2CubeSize_eq_8
  46
  47end IndisputableMonolith.Mathematics.LinearAlgebraFromRS
  48

source mirrored from github.com/jonwashburn/shape-of-logic