File: Mathlib/RingTheory/FreeCommRing.lean

full_name: FreeCommRing
code: /-- `FreeCommRing α` is the free commutative ring on the type `α`. -/
def FreeCommRing (α : Type u) : Type u 
goal: Type u

full_name: FreeCommRing.instCommRing
code: instance FreeCommRing.instCommRing : CommRing (FreeCommRing α) 
goal: CommRing (FreeCommRing α)

full_name: FreeCommRing.instInhabited
code: instance FreeCommRing.instInhabited : Inhabited (FreeCommRing α) 
goal: Inhabited (FreeCommRing α)

full_name: FreeCommRing.of
code: /-- The canonical map from `α` to the free commutative ring on `α`. -/
def of (x : α) : FreeCommRing α 
goal: FreeCommRing α

full_name: FreeCommRing.of_injective
code: theorem of_injective : Function.Injective (of : α → FreeCommRing α) 
goal: Function.Injective FreeCommRing.of

full_name: FreeCommRing.of_cons
code: lemma of_cons (a : α) (m : Multiset α) : (FreeAbelianGroup.of (Multiplicative.ofAdd (a ::ₘ m))) =
    @HMul.hMul _ (FreeCommRing α) (FreeCommRing α) _ (of a)
    (FreeAbelianGroup.of (Multiplicative.ofAdd m)) 
goal: FreeAbelianGroup.of (Multiplicative.ofAdd (a ::ₘ m)) = FreeCommRing.of a * FreeAbelianGroup.of (Multiplicative.ofAdd m)

full_name: FreeCommRing.induction_on
code: @[elab_as_elim, induction_eliminator]
protected theorem induction_on {C : FreeCommRing α → Prop} (z : FreeCommRing α) (hn1 : C (-1))
    (hb : ∀ b, C (of b)) (ha : ∀ x y, C x → C y → C (x + y)) (hm : ∀ x y, C x → C y → C (x * y)) :
    C z 
goal: C z

full_name: _private.Mathlib.RingTheory.FreeCommRing.0.FreeCommRing.liftToMultiset
code: /-- A helper to implement `lift`. This is essentially `FreeCommMonoid.lift`, but this does not
currently exist. -/
private def liftToMultiset : (α → R) ≃ (Multiplicative (Multiset α) →* R) 
goal: (α → R) ≃ (Multiplicative (Multiset α) →* R)

full_name: FreeCommRing.lift
code: /-- Lift a map `α → R` to an additive group homomorphism `FreeCommRing α → R`. -/
def lift : (α → R) ≃ (FreeCommRing α →+* R) 
goal: (α → R) ≃ (FreeCommRing α →+* R)

full_name: FreeCommRing.lift_of
code: @[simp]
theorem lift_of (x : α) : lift f (of x) = f x 
goal: (FreeCommRing.lift f) (FreeCommRing.of x) = f x

full_name: FreeCommRing.lift_comp_of
code: @[simp]
theorem lift_comp_of (f : FreeCommRing α →+* R) : lift (f ∘ of) = f 
goal: FreeCommRing.lift (⇑f ∘ FreeCommRing.of) = f

full_name: FreeCommRing.hom_ext
code: @[ext 1100]
theorem hom_ext ⦃f g : FreeCommRing α →+* R⦄ (h : ∀ x, f (of x) = g (of x)) : f = g 
goal: f = g

full_name: FreeCommRing.map
code: /-- A map `f : α → β` produces a ring homomorphism `FreeCommRing α →+* FreeCommRing β`. -/
def map : FreeCommRing α →+* FreeCommRing β 
goal: FreeCommRing α →+* FreeCommRing β

full_name: FreeCommRing.map_of
code: @[simp]
theorem map_of (x : α) : map f (of x) = of (f x) 
goal: (FreeCommRing.map f) (FreeCommRing.of x) = FreeCommRing.of (f x)

full_name: FreeCommRing.IsSupported
code: /-- `is_supported x s` means that all monomials showing up in `x` have variables in `s`. -/
def IsSupported (x : FreeCommRing α) (s : Set α) : Prop 
goal: Prop

full_name: FreeCommRing.isSupported_upwards
code: theorem isSupported_upwards (hs : IsSupported x s) (hst : s ⊆ t) : IsSupported x t 
goal: x.IsSupported t

full_name: FreeCommRing.isSupported_add
code: theorem isSupported_add (hxs : IsSupported x s) (hys : IsSupported y s) : IsSupported (x + y) s 
goal: (x + y).IsSupported s

full_name: FreeCommRing.isSupported_neg
code: theorem isSupported_neg (hxs : IsSupported x s) : IsSupported (-x) s 
goal: (-x).IsSupported s

full_name: FreeCommRing.isSupported_sub
code: theorem isSupported_sub (hxs : IsSupported x s) (hys : IsSupported y s) : IsSupported (x - y) s 
goal: (x - y).IsSupported s

full_name: FreeCommRing.isSupported_mul
code: theorem isSupported_mul (hxs : IsSupported x s) (hys : IsSupported y s) : IsSupported (x * y) s 
goal: (x * y).IsSupported s

full_name: FreeCommRing.isSupported_zero
code: theorem isSupported_zero : IsSupported 0 s 
goal: FreeCommRing.IsSupported 0 s

full_name: FreeCommRing.isSupported_one
code: theorem isSupported_one : IsSupported 1 s 
goal: FreeCommRing.IsSupported 1 s

full_name: FreeCommRing.isSupported_int
code: theorem isSupported_int {i : ℤ} {s : Set α} : IsSupported (↑i) s 
goal: (↑i).IsSupported s

full_name: FreeCommRing.restriction
code: /-- The restriction map from `FreeCommRing α` to `FreeCommRing s` where `s : Set α`, defined
  by sending all variables not in `s` to zero. -/
def restriction (s : Set α) [DecidablePred (· ∈ s)] : FreeCommRing α →+* FreeCommRing s 
goal: FreeCommRing α →+* FreeCommRing ↑s

full_name: FreeCommRing.restriction_of
code: @[simp]
theorem restriction_of (p) : restriction s (of p) = if H : p ∈ s then of ⟨p, H⟩ else 0 
goal: (FreeCommRing.restriction s) (FreeCommRing.of p) = if H : p ∈ s then FreeCommRing.of ⟨p, H⟩ else 0

full_name: FreeCommRing.isSupported_of
code: theorem isSupported_of {p} {s : Set α} : IsSupported (of p) s ↔ p ∈ s 
goal: (FreeCommRing.of p).IsSupported s ↔ p ∈ s

full_name: FreeCommRing.map_subtype_val_restriction
code: theorem map_subtype_val_restriction {x} (s : Set α) [DecidablePred (· ∈ s)]
    (hxs : IsSupported x s) : map (↑) (restriction s x) = x 
goal: (FreeCommRing.map Subtype.val) ((FreeCommRing.restriction s) x) = x

full_name: FreeCommRing.exists_finite_support
code: theorem exists_finite_support (x : FreeCommRing α) : ∃ s : Set α, Set.Finite s ∧ IsSupported x s 
goal: ∃ s, s.Finite ∧ x.IsSupported s

full_name: FreeCommRing.exists_finset_support
code: theorem exists_finset_support (x : FreeCommRing α) : ∃ s : Finset α, IsSupported x ↑s 
goal: ∃ s, x.IsSupported ↑s

full_name: FreeRing.toFreeCommRing
code: /-- The canonical ring homomorphism from the free ring generated by `α` to the free commutative ring
    generated by `α`. -/
def toFreeCommRing {α} : FreeRing α →+* FreeCommRing α 
goal: FreeRing α →+* FreeCommRing α

full_name: FreeRing.castFreeCommRing
code: /-- The coercion defined by the canonical ring homomorphism from the free ring generated by `α` to
the free commutative ring generated by `α`. -/
@[coe] def castFreeCommRing {α} : FreeRing α → FreeCommRing α 
goal: FreeRing α → FreeCommRing α

full_name: FreeRing.FreeCommRing.instCoe
code: instance FreeCommRing.instCoe : Coe (FreeRing α) (FreeCommRing α) 
goal: Coe (FreeRing α) (FreeCommRing α)

full_name: FreeRing.coeRingHom
code: /-- The natural map `FreeRing α → FreeCommRing α`, as a `RingHom`. -/
def coeRingHom : FreeRing α →+* FreeCommRing α 
goal: FreeRing α →+* FreeCommRing α

full_name: FreeRing.coe_zero
code: @[simp, norm_cast]
protected theorem coe_zero : ↑(0 : FreeRing α) = (0 : FreeCommRing α) 
goal: ↑0 = 0

full_name: FreeRing.coe_one
code: @[simp, norm_cast]
protected theorem coe_one : ↑(1 : FreeRing α) = (1 : FreeCommRing α) 
goal: ↑1 = 1

full_name: FreeRing.coe_of
code: @[simp]
protected theorem coe_of (a : α) : ↑(FreeRing.of a) = FreeCommRing.of a 
goal: ↑(FreeRing.of a) = FreeCommRing.of a

full_name: FreeRing.coe_neg
code: @[simp, norm_cast]
protected theorem coe_neg (x : FreeRing α) : ↑(-x) = -(x : FreeCommRing α) 
goal: ↑(-x) = -↑x

full_name: FreeRing.coe_add
code: @[simp, norm_cast]
protected theorem coe_add (x y : FreeRing α) : ↑(x + y) = (x : FreeCommRing α) + y 
goal: ↑(x + y) = ↑x + ↑y

full_name: FreeRing.coe_sub
code: @[simp, norm_cast]
protected theorem coe_sub (x y : FreeRing α) : ↑(x - y) = (x : FreeCommRing α) - y 
goal: ↑(x - y) = ↑x - ↑y

full_name: FreeRing.coe_mul
code: @[simp, norm_cast]
protected theorem coe_mul (x y : FreeRing α) : ↑(x * y) = (x : FreeCommRing α) * y 
goal: ↑(x * y) = ↑x * ↑y

full_name: FreeRing.coe_surjective
code: protected theorem coe_surjective : Surjective ((↑) : FreeRing α → FreeCommRing α) 
goal: Function.Surjective FreeRing.castFreeCommRing

full_name: FreeRing.coe_eq
code: theorem coe_eq : ((↑) : FreeRing α → FreeCommRing α) =
    @Functor.map FreeAbelianGroup _ _ _ fun l : List α => (l : Multiset α) 
goal: FreeRing.castFreeCommRing = Functor.map fun l => ↑l

full_name: FreeRing.subsingletonEquivFreeCommRing
code: /-- If α has size at most 1 then the natural map from the free ring on `α` to the
    free commutative ring on `α` is an isomorphism of rings. -/
def subsingletonEquivFreeCommRing [Subsingleton α] : FreeRing α ≃+* FreeCommRing α 
goal: FreeRing α ≃+* FreeCommRing α

full_name: FreeRing.instCommRing
code: instance instCommRing [Subsingleton α] : CommRing (FreeRing α) 
goal: CommRing (FreeRing α)

full_name: freeCommRingEquivMvPolynomialInt
code: /-- The free commutative ring on `α` is isomorphic to the polynomial ring over ℤ with
    variables in `α` -/
def freeCommRingEquivMvPolynomialInt : FreeCommRing α ≃+* MvPolynomial α ℤ 
goal: FreeCommRing α ≃+* MvPolynomial α ℤ

full_name: freeCommRingPemptyEquivInt
code: /-- The free commutative ring on the empty type is isomorphic to `ℤ`. -/
def freeCommRingPemptyEquivInt : FreeCommRing PEmpty.{u + 1} ≃+* ℤ 
goal: FreeCommRing PEmpty.{u + 1} ≃+* ℤ

full_name: freeCommRingPunitEquivPolynomialInt
code: /-- The free commutative ring on a type with one term is isomorphic to `ℤ[X]`. -/
def freeCommRingPunitEquivPolynomialInt : FreeCommRing PUnit.{u + 1} ≃+* ℤ[X] 
goal: FreeCommRing PUnit.{u + 1} ≃+* ℤ[X]

full_name: freeRingPemptyEquivInt
code: /-- The free ring on the empty type is isomorphic to `ℤ`. -/
def freeRingPemptyEquivInt : FreeRing PEmpty.{u + 1} ≃+* ℤ 
goal: FreeRing PEmpty.{u + 1} ≃+* ℤ

full_name: freeRingPunitEquivPolynomialInt
code: /-- The free ring on a type with one term is isomorphic to `ℤ[X]`. -/
def freeRingPunitEquivPolynomialInt : FreeRing PUnit.{u + 1} ≃+* ℤ[X] 
goal: FreeRing PUnit.{u + 1} ≃+* ℤ[X]