Datasets:
Tasks:
Text Generation
Modalities:
Text
Sub-tasks:
language-modeling
Languages:
English
Size:
100K - 1M
License:
/- | |
Copyright (c) 2021 Chris Hughes. All rights reserved. | |
Released under Apache 2.0 license as described in the file LICENSE. | |
Authors: Chris Hughes | |
-/ | |
import data.mv_polynomial.variables | |
/-! | |
# Polynomials supported by a set of variables | |
This file contains the definition and lemmas about `mv_polynomial.supported`. | |
## Main definitions | |
* `mv_polynomial.supported` : Given a set `s : set Ο`, `supported R s` is the subalgebra of | |
`mv_polynomial Ο R` consisting of polynomials whose set of variables is contained in `s`. | |
This subalgebra is isomorphic to `mv_polynomial s R` | |
## Tags | |
variables, polynomial, vars | |
-/ | |
universes u v w | |
namespace mv_polynomial | |
variables {Ο Ο : Type*} {R : Type u} {S : Type v} {r : R} {e : β} {n m : Ο} | |
section comm_semiring | |
variables [comm_semiring R] {p q : mv_polynomial Ο R} | |
variables (R) | |
/-- The set of polynomials whose variables are contained in `s` as a `subalgebra` over `R`. -/ | |
noncomputable def supported (s : set Ο) : subalgebra R (mv_polynomial Ο R) := | |
algebra.adjoin R (X '' s) | |
variables {Ο R} | |
open_locale classical | |
open algebra | |
lemma supported_eq_range_rename (s : set Ο) : | |
supported R s = (rename (coe : s β Ο)).range := | |
by rw [supported, set.image_eq_range, adjoin_range_eq_range_aeval, rename] | |
/--The isomorphism between the subalgebra of polynomials supported by `s` and `mv_polynomial s R`-/ | |
noncomputable def supported_equiv_mv_polynomial (s : set Ο) : | |
supported R s ββ[R] mv_polynomial s R := | |
(subalgebra.equiv_of_eq _ _ (supported_eq_range_rename s)).trans | |
(alg_equiv.of_injective (rename (coe : s β Ο)) | |
(rename_injective _ subtype.val_injective)).symm | |
@[simp] lemma supported_equiv_mv_polynomial_symm_C (s : set Ο) (x : R) : | |
(supported_equiv_mv_polynomial s).symm (C x) = algebra_map R (supported R s) x := | |
begin | |
ext1, | |
simp [supported_equiv_mv_polynomial, mv_polynomial.algebra_map_eq], | |
end | |
@[simp] lemma supported_equiv_mv_polynomial_symm_X (s : set Ο) (i : s) : | |
(β((supported_equiv_mv_polynomial s).symm (X i : mv_polynomial s R)) : mv_polynomial Ο R) = X i := | |
by simp [supported_equiv_mv_polynomial] | |
variables {s t : set Ο} | |
lemma mem_supported : p β (supported R s) β βp.vars β s := | |
begin | |
rw [supported_eq_range_rename, alg_hom.mem_range], | |
split, | |
{ rintros β¨p, rflβ©, | |
refine trans (finset.coe_subset.2 (vars_rename _ _)) _, | |
simp }, | |
{ intros hs, | |
exact exists_rename_eq_of_vars_subset_range p (coe : s β Ο) subtype.val_injective (by simpa) } | |
end | |
lemma supported_eq_vars_subset : (supported R s : set (mv_polynomial Ο R)) = {p | βp.vars β s} := | |
set.ext $ Ξ» _, mem_supported | |
@[simp] lemma mem_supported_vars (p : mv_polynomial Ο R) : p β supported R (βp.vars : set Ο) := | |
by rw [mem_supported] | |
variable (s) | |
lemma supported_eq_adjoin_X : supported R s = algebra.adjoin R (X '' s) := rfl | |
@[simp] lemma supported_univ : supported R (set.univ : set Ο) = β€ := | |
by simp [algebra.eq_top_iff, mem_supported] | |
@[simp] lemma supported_empty : supported R (β : set Ο) = β₯ := | |
by simp [supported_eq_adjoin_X] | |
variables {s} | |
lemma supported_mono (st : s β t) : supported R s β€ supported R t := | |
algebra.adjoin_mono (set.image_subset _ st) | |
@[simp] lemma X_mem_supported [nontrivial R] {i : Ο} : (X i) β supported R s β i β s := | |
by simp [mem_supported] | |
@[simp] lemma supported_le_supported_iff [nontrivial R] : | |
supported R s β€ supported R t β s β t := | |
begin | |
split, | |
{ intros h i, | |
simpa using @h (X i) }, | |
{ exact supported_mono } | |
end | |
lemma supported_strict_mono [nontrivial R] : | |
strict_mono (supported R : set Ο β subalgebra R (mv_polynomial Ο R)) := | |
strict_mono_of_le_iff_le (Ξ» _ _, supported_le_supported_iff.symm) | |
lemma exists_restrict_to_vars (R : Type*) [comm_ring R] {F : mv_polynomial Ο β€} (hF : βF.vars β s) : | |
β f : (s β R) β R, β x : Ο β R, f (x β coe : s β R) = aeval x F := | |
begin | |
classical, | |
rw [β mem_supported, supported_eq_range_rename, alg_hom.mem_range] at hF, | |
cases hF with F' hF', | |
use Ξ» z, aeval z F', | |
intro x, | |
simp only [βhF', aeval_rename], | |
end | |
end comm_semiring | |
end mv_polynomial | |