OAI/Computability/WLIdentification/WordArithmetic.lean
37 declarations, 0 contain sorry, 0 declared as axioms
- abbrev
OAI.WLIdentification.WordExpressions.NatPolyline 8 - abbrev
OAI.WLIdentification.WordExpressions.BoolPolyline 9 - theorem
OAI.WLIdentification.WordExpressions.BoolPoly.constline 13 - theorem
OAI.WLIdentification.WordExpressions.BoolPoly.notline 14 - theorem
OAI.WLIdentification.WordExpressions.BoolPoly.andline 17 - theorem
OAI.WLIdentification.WordExpressions.BoolPoly.orline 21 - theorem
OAI.WLIdentification.WordExpressions.BoolPoly.renameline 25 - theorem
OAI.WLIdentification.WordExpressions.NatPoly.lengthline 31 - theorem
OAI.WLIdentification.WordExpressions.NatPoly.varline 33 - theorem
OAI.WLIdentification.WordExpressions.NatPoly.constline 34 - theorem
OAI.WLIdentification.WordExpressions.NatPoly.renameline 35 - theorem
OAI.WLIdentification.WordExpressions.NatPoly.addline 38 - theorem
OAI.WLIdentification.WordExpressions.NatPoly.succline 41 - theorem
OAI.WLIdentification.WordExpressions.NatPoly.subline 42 - theorem
OAI.WLIdentification.WordExpressions.NatPoly.leline 45 - theorem
OAI.WLIdentification.WordExpressions.NatPoly.ltline 49 - theorem
OAI.WLIdentification.WordExpressions.NatPoly.eqtestline 53 - theorem
OAI.WLIdentification.WordExpressions.NatPoly.iteline 57 - theorem
OAI.WLIdentification.WordExpressions.NatPoly.maxline 63 - theorem
OAI.WLIdentification.WordExpressions.NatPoly.minline 67 - theorem
OAI.WLIdentification.WordExpressions.NatPoly.mulVarsline 72 - theorem
OAI.WLIdentification.WordExpressions.NatPoly.mulline 86 - theorem
OAI.WLIdentification.WordExpressions.NatPoly.pow_constline 92 - theorem
OAI.WLIdentification.WordExpressions.Poly.nthline 103Source documentation
The i-th bit in left-to-right order, with a false default outside the word.
theorem nth {w : (Fin n → Word) → Word} {i : (Fin n → Word) → ℕ} (hw : Poly w) (hi : NatPoly i) : BoolPoly (fun S => (w S)[i S]?.getD false) := by …Mentions: OAI.WLIdentification.Word, OAI.WLIdentification.WordExpressions.Poly, OAI.WLIdentification.WordExpressions.NatPoly, OAI.WLIdentification.WordExpressions.BoolPoly
- theorem
OAI.WLIdentification.WordExpressions.Poly.tabulateline 133Source documentation
Polynomially bounded tabulation is implemented by captured-count iteration; there is no list-construction oracle in the underlying Machine.
theorem tabulate {c : (Fin n → Word) → ℕ} {p : (Fin (n+1) → Word) → Bool} (hc : NatPoly c) (hp : BoolPoly p) : Poly (fun S => (List.range (c S)).map (fun i => p (Fin.snoc S (unary i)))) := by …Mentions: OAI.WLIdentification.Word, OAI.WLIdentification.WordExpressions.NatPoly, OAI.WLIdentification.WordExpressions.BoolPoly, OAI.WLIdentification.WordExpressions.Poly, OAI.WLIdentification.WordExpressions.unary
- theorem
OAI.WLIdentification.WordExpressions.Poly.length_boundline 171 - theorem
OAI.WLIdentification.WordExpressions.NatPoly.boundline 181 - def
OAI.WLIdentification.WordExpressions.NatPoly.stagesline 187Source documentation
Natural-valued iteration, represented by literal unary words.
def stages (f : (Fin (n+2) → Word) → ℕ) (S : Fin n → Word) (a : ℕ) : ℕ → ℕ | 0 => a | k+1 => f (Fin.snoc (Fin.snoc S (unary k)) (unary (stages f S a k)))
Mentions: OAI.WLIdentification.Word, OAI.WLIdentification.WordExpressions.unary
- theorem
OAI.WLIdentification.WordExpressions.NatPoly.stages_wordline 191 - theorem
OAI.WLIdentification.WordExpressions.NatPoly.loopline 197 - theorem
OAI.WLIdentification.WordExpressions.BoolPoly.boundedAllline 212 - theorem
OAI.WLIdentification.WordExpressions.BoolPoly.boundedAnyline 234 - theorem
OAI.WLIdentification.WordExpressions.Poly.applyWordline 248 - theorem
OAI.WLIdentification.WordExpressions.NatPoly.findGreatestline 261 - theorem
OAI.WLIdentification.WordExpressions.NatPoly.divline 287 - theorem
OAI.WLIdentification.WordExpressions.NatPoly.modline 317 - theorem
OAI.WLIdentification.WordExpressions.Poly.computesline 326