polyrith
本頁內容尚未翻譯。
IEqHyp
Section titled “IEqHyp”data IEqHypA polyrith hypothesis ieq a b c: eval a = eval b, used with coefficient polynomial c.
ieqHolds
Section titled “ieqHolds”def ieqHolds (ρ : List Int) (l : List IEqHyp) : TypeThe proposition that every equation hypothesis in the list holds under the environment.
ieqSum
Section titled “ieqSum”def ieqSum (l : List IEqHyp) : IntExprThe combination Σ cᵢ·(aᵢ − bᵢ) of the hypotheses as an integer expression.
prZeroStep
Section titled “prZeroStep”theorem prZeroStep (c : Int) (b : Int) : Int.add (Int.mul c (Int.add b (Int.neg b))) (pos zero) = pos zeroc·(b − b) + 0 = 0 over Int; a step lemma for prSumZero.
prSumZero
Section titled “prSumZero”def prSumZero (ρ : List Int) (l : List IEqHyp) (pf : ieqHolds ρ l) : intEval ρ (ieqSum l) = pos zeroWhen all hypotheses hold, the combination Σ cᵢ·(aᵢ − bᵢ) evaluates to zero.
prMulCancel
Section titled “prMulCancel”def prMulCancel (L : Nat) (x : Int) : Int.mul (pos (succ L)) x = pos zero -> x = pos zeroInt has no zero divisors by positive constants: (L+1)·x = 0 implies x = 0.
prOfDiffR
Section titled “prOfDiffR”theorem prOfDiffR (a : Int) (b : Int) : a = Int.add (Int.add a (Int.neg b)) ba = (a − b) + b over Int.
prZeroAdd
Section titled “prZeroAdd”theorem prZeroAdd (b : Int) : Int.add (pos zero) b = b0 + b = b over Int.
prOfDiff
Section titled “prOfDiff”def prOfDiff (a : Int) (b : Int) (p : Int.add a (Int.neg b) = pos zero) : a = ba − b = 0 implies a = b over Int.
polyrithEq
Section titled “polyrithEq”def polyrithEq (ρ : List Int) (l : List IEqHyp) (pf : ieqHolds ρ l) (a : IntExpr) (b : IntExpr) (L : Nat) (cert : intCheckL (imul (inum (succ L)) (iadd a (ineg b))) (ieqSum l) = intCheckR (imul (inum (succ L)) (iadd a (ineg b))) (ieqSum l)) : intEval ρ a = intEval ρ bThe certificate the polyrith tactic produces: if (L+1)·(a − b) equals a combination of the hypotheses as polynomials, then a = b.
polyrithTestPower
Section titled “polyrithTestPower”def polyrithTestPower (p : Int) (v : Int) (i : Int) (r : Int) (h1 : p = Int.mul v i) (h2 : v = Int.mul i r) : p = Int.mul (Int.mul i i) rExample of using polyrithEq directly to combine two equations without the tactic.