- CVar {α : Type u} {Idx : Type v} (x : Idx) : Formula α Idx
- Add {α : Type u} {Idx : Type v} (g h : Formula α Idx) : Formula α Idx
- Mult {α : Type u} {Idx : Type v} (g h : Formula α Idx) : Formula α Idx
- Neg {α : Type u} {Idx : Type v} (g : Formula α Idx) : Formula α Idx
- Const {α : Type u} {Idx : Type v} (c : α) : Formula α Idx
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
Equations
- AlgebraicComplexity.Formulas.sub = { sub := fun (a b : AlgebraicComplexity.Formulas.Formula α Idx) => a + -b }
Equations
Equations
Instances For
Equations
- AlgebraicComplexity.Formulas.size (AlgebraicComplexity.Formulas.Formula.CVar x) = 1
- AlgebraicComplexity.Formulas.size (g.Add h) = AlgebraicComplexity.Formulas.size g + AlgebraicComplexity.Formulas.size h + 1
- AlgebraicComplexity.Formulas.size (g.Mult h) = AlgebraicComplexity.Formulas.size g + AlgebraicComplexity.Formulas.size h + 1
- AlgebraicComplexity.Formulas.size g.Neg = AlgebraicComplexity.Formulas.size g + 1
- AlgebraicComplexity.Formulas.size C[c] = 1
Instances For
Equations
- AlgebraicComplexity.Formulas.depth (AlgebraicComplexity.Formulas.Formula.CVar x) = 0
- AlgebraicComplexity.Formulas.depth (g.Add h) = max (AlgebraicComplexity.Formulas.depth g) (AlgebraicComplexity.Formulas.depth h) + 1
- AlgebraicComplexity.Formulas.depth (g.Mult h) = max (AlgebraicComplexity.Formulas.depth g) (AlgebraicComplexity.Formulas.depth h) + 1
- AlgebraicComplexity.Formulas.depth g.Neg = AlgebraicComplexity.Formulas.depth g + 1
- AlgebraicComplexity.Formulas.depth C[c] = 0
Instances For
noncomputable def
AlgebraicComplexity.Formulas.evalToPolynomial
{α : Type u}
{Idx : Type v}
[CommRing α]
(f : Formula α Idx)
:
MvPolynomial Idx α
Equations
- AlgebraicComplexity.Formulas.evalToPolynomial (AlgebraicComplexity.Formulas.Formula.CVar x) = MvPolynomial.X x ^ 1
- AlgebraicComplexity.Formulas.evalToPolynomial (g.Add h) = AlgebraicComplexity.Formulas.evalToPolynomial g + AlgebraicComplexity.Formulas.evalToPolynomial h
- AlgebraicComplexity.Formulas.evalToPolynomial (g.Mult h) = AlgebraicComplexity.Formulas.evalToPolynomial g * AlgebraicComplexity.Formulas.evalToPolynomial h
- AlgebraicComplexity.Formulas.evalToPolynomial g.Neg = -AlgebraicComplexity.Formulas.evalToPolynomial g
- AlgebraicComplexity.Formulas.evalToPolynomial C[c] = MvPolynomial.C c
Instances For
theorem
AlgebraicComplexity.Formulas.size_highest_degree
{α : Type u}
{Idx : Type v}
[CommRing α]
[Nontrivial α]
(f : Formula α Idx)
:
def
AlgebraicComplexity.Formulas.coeFormula
{α : Type u}
{Idx₁ : Type u_1}
{Idx₂ : Type u_2}
[Coe Idx₁ Idx₂]
(f : Formula α Idx₁)
:
Formula α Idx₂
coerce_up f coerces a formula f in n variables to a formula in n + 1 variables.
Equations
- AlgebraicComplexity.Formulas.coeFormula (AlgebraicComplexity.Formulas.Formula.CVar x) = AlgebraicComplexity.Formulas.Formula.CVar (Coe.coe x)
- AlgebraicComplexity.Formulas.coeFormula (g.Add h) = (AlgebraicComplexity.Formulas.coeFormula g).Add (AlgebraicComplexity.Formulas.coeFormula h)
- AlgebraicComplexity.Formulas.coeFormula (g.Mult h) = (AlgebraicComplexity.Formulas.coeFormula g).Mult (AlgebraicComplexity.Formulas.coeFormula h)
- AlgebraicComplexity.Formulas.coeFormula g.Neg = (AlgebraicComplexity.Formulas.coeFormula g).Neg
- AlgebraicComplexity.Formulas.coeFormula C[c] = C[c]
Instances For
instance
AlgebraicComplexity.Formulas.instCoeFormula
{α : Type u}
{Idx₁ : Type u_1}
{Idx₂ : Type u_2}
[Coe Idx₁ Idx₂]
:
This is the Coe typeclass instance for the above coercion. T
Equations
- AlgebraicComplexity.Formulas.instCoeFormula = { coe := fun (f : AlgebraicComplexity.Formulas.Formula α Idx₁) => AlgebraicComplexity.Formulas.coeFormula f }
theorem
AlgebraicComplexity.Formulas.coeFormula_composes_rename
{α : Type u}
{Idx₁ : Type u_1}
{Idx₂ : Type u_2}
[CommRing α]
[instCoe : Coe Idx₁ Idx₂]
(f : Formula α Idx₁)
(p : MvPolynomial Idx₁ α)
(heval : evalToPolynomial f = p)
:
def
AlgebraicComplexity.Formulas.FormulaComplexityUpperBound
{α : Type u}
{ID : Type u_1}
[CommRing α]
(p : MvPolynomial ID α)
(size_bound : ℕ)
:
The complexity of a polynomial p, denoted L p is the size of the smallest formula that evaluates to it
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
AlgebraicComplexity.Formulas.FormulaComplexityLowerBound
{α : Type u}
{ID : Type u_1}
[CommRing α]
(p : MvPolynomial ID α)
(size_bound : ℕ)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
AlgebraicComplexity.Formulas.complexity_UB_monomial
{α : Type u}
{ID : Type u_1}
[CommRing α]
[Nontrivial α]
(deg : ℕ)
:
have my_monomial := fun (x : ID) => MvPolynomial.X x ^ deg;
∀ (x : ID), FormulaComplexityUpperBound (my_monomial x) (2 * deg + 1)