Semantic input substitutions #
An input substitution expresses every old input as a scalar function of a new input vector. It covers ordinary restrictions, variable identifications, and affine or higher-degree substitutions without imposing basis-specific syntax.
@[reducible, inline]
A substitution of n old inputs by scalar functions of k new inputs.
Equations
- Algebraic.InputSubstitution U n k = (Fin n → Algebraic.ScalarFunction U k)
Instances For
def
Algebraic.InputSubstitution.apply
{U : Type u_1}
{n k : ℕ}
(substitution : InputSubstitution U n k)
(input : Fin k → U)
:
Fin n → U
Evaluate an input substitution on a new input vector.
Instances For
The identity input substitution.
Equations
- Algebraic.InputSubstitution.id input values = values input
Instances For
def
Algebraic.InputSubstitution.comp
{U : Type u_1}
{n k l : ℕ}
(outer : InputSubstitution U n k)
(inner : InputSubstitution U k l)
:
InputSubstitution U n l
Compose input substitutions, applying inner before outer.
Instances For
@[simp]
theorem
Algebraic.InputSubstitution.comp_apply
{U : Type u_1}
{n k l : ℕ}
(outer : InputSubstitution U n k)
(inner : InputSubstitution U k l)
(input : Fin l → U)
:
@[simp]
theorem
Algebraic.InputSubstitution.comp_id
{U : Type u_1}
{n k : ℕ}
(substitution : InputSubstitution U n k)
:
@[simp]
theorem
Algebraic.InputSubstitution.id_comp
{U : Type u_1}
{n k : ℕ}
(substitution : InputSubstitution U n k)
:
theorem
Algebraic.InputSubstitution.comp_assoc
{U : Type u_1}
{n k l r : ℕ}
(first : InputSubstitution U n k)
(second : InputSubstitution U k l)
(third : InputSubstitution U l r)
:
def
Algebraic.InputSubstitution.fix
{n : ℕ}
{U : Type u_1}
(selected : Fin (n + 1))
(value : U)
:
InputSubstitution U (n + 1) n
Fix one input of an (n + 1)-input function and reindex the others.
Equations
- Algebraic.InputSubstitution.fix selected value oldInput input = selected.insertNth value input oldInput
Instances For
def
Algebraic.Target.substitute
{U : Type u_1}
{n m k : ℕ}
(target : Target U n m)
(substitution : InputSubstitution U n k)
:
Target U k m
Restrict a target along an input substitution.
Equations
- target.substitute substitution input = target (substitution.apply input)
Instances For
@[simp]
theorem
Algebraic.Target.substitute_apply
{U : Type u_1}
{n m k : ℕ}
(target : Target U n m)
(substitution : InputSubstitution U n k)
(input : Fin k → U)
:
@[simp]
theorem
Algebraic.Target.substitute_comp
{U : Type u_1}
{n m k l : ℕ}
(target : Target U n m)
(outer : InputSubstitution U n k)
(inner : InputSubstitution U k l)
: