File: Mathlib/Algebra/Group/WithOne/Defs.lean

full_name: WithOne
code: /-- Add an extra element `1` to a type -/
@[to_additive "Add an extra element `0` to a type"]
def WithOne (α) 
goal: Type u_1

full_name: WithZero
code: /-- Add an extra element `1` to a type -/
@[to_additive "Add an extra element `0` to a type"]
def WithOne (α) 
goal: Type u_1

full_name: WithOne.instReprWithZero
code: instance [Repr α] : Repr (WithZero α) 
goal: Repr (WithZero α)

full_name: WithOne.instRepr
code: @[to_additive]
instance [Repr α] : Repr (WithOne α) 
goal: Repr (WithOne α)

full_name: WithZero.instRepr
code: @[to_additive]
instance [Repr α] : Repr (WithOne α) 
goal: Repr (WithZero α)

full_name: WithZero.monad
code: @[to_additive]
instance monad : Monad WithOne 
goal: Monad WithZero

full_name: WithOne.monad
code: @[to_additive]
instance monad : Monad WithOne 
goal: Monad WithOne

full_name: WithZero.zero
code: @[to_additive]
instance one : One (WithOne α) 
goal: Zero (WithZero α)

full_name: WithOne.one
code: @[to_additive]
instance one : One (WithOne α) 
goal: One (WithOne α)

full_name: WithOne.mul
code: @[to_additive]
instance mul [Mul α] : Mul (WithOne α) 
goal: Mul (WithOne α)

full_name: WithZero.add
code: @[to_additive]
instance mul [Mul α] : Mul (WithOne α) 
goal: Add (WithZero α)

full_name: WithOne.inv
code: @[to_additive]
instance inv [Inv α] : Inv (WithOne α) 
goal: Inv (WithOne α)

full_name: WithZero.neg
code: @[to_additive]
instance inv [Inv α] : Inv (WithOne α) 
goal: Neg (WithZero α)

full_name: WithOne.invOneClass
code: @[to_additive]
instance invOneClass [Inv α] : InvOneClass (WithOne α) 
goal: InvOneClass (WithOne α)

full_name: WithZero.negZeroClass
code: @[to_additive]
instance invOneClass [Inv α] : InvOneClass (WithOne α) 
goal: NegZeroClass (WithZero α)

full_name: WithZero.inhabited
code: @[to_additive]
instance inhabited : Inhabited (WithOne α) 
goal: Inhabited (WithZero α)

full_name: WithOne.inhabited
code: @[to_additive]
instance inhabited : Inhabited (WithOne α) 
goal: Inhabited (WithOne α)

full_name: WithZero.nontrivial
code: @[to_additive]
instance nontrivial [Nonempty α] : Nontrivial (WithOne α) 
goal: Nontrivial (WithZero α)

full_name: WithOne.nontrivial
code: @[to_additive]
instance nontrivial [Nonempty α] : Nontrivial (WithOne α) 
goal: Nontrivial (WithOne α)

full_name: WithZero.coe
code: /-- The canonical map from `α` into `WithOne α` -/
@[to_additive (attr := coe) "The canonical map from `α` into `WithZero α`"]
def coe : α → WithOne α 
goal: α → WithZero α

full_name: WithOne.coe
code: /-- The canonical map from `α` into `WithOne α` -/
@[to_additive (attr := coe) "The canonical map from `α` into `WithZero α`"]
def coe : α → WithOne α 
goal: α → WithOne α

full_name: WithOne.coeTC
code: @[to_additive]
instance coeTC : CoeTC α (WithOne α) 
goal: CoeTC α (WithOne α)

full_name: WithZero.coeTC
code: @[to_additive]
instance coeTC : CoeTC α (WithOne α) 
goal: CoeTC α (WithZero α)

full_name: WithOne.recOneCoe
code: /-- Recursor for `WithOne` using the preferred forms `1` and `↑a`. -/
@[to_additive (attr := elab_as_elim, induction_eliminator, cases_eliminator)
  "Recursor for `WithZero` using the preferred forms `0` and `↑a`."]
def recOneCoe {C : WithOne α → Sort*} (h₁ : C 1) (h₂ : ∀ a : α, C a) : ∀ n : WithOne α, C n
  
goal: C n

full_name: WithZero.recZeroCoe
code: /-- Recursor for `WithOne` using the preferred forms `1` and `↑a`. -/
@[to_additive (attr := elab_as_elim, induction_eliminator, cases_eliminator)
  "Recursor for `WithZero` using the preferred forms `0` and `↑a`."]
def recOneCoe {C : WithOne α → Sort*} (h₁ : C 1) (h₂ : ∀ a : α, C a) : ∀ n : WithOne α, C n
  
goal: C n

full_name: WithZero.unzero
code: /-- Deconstruct an `x : WithOne α` to the underlying value in `α`, given a proof that `x ≠ 1`. -/
@[to_additive unzero
      "Deconstruct an `x : WithZero α` to the underlying value in `α`, given a proof that `x ≠ 0`."]
def unone : ∀ {x : WithOne α}, x ≠ 1 → α 
goal: x ≠ 0 → α

full_name: WithOne.unone
code: /-- Deconstruct an `x : WithOne α` to the underlying value in `α`, given a proof that `x ≠ 1`. -/
@[to_additive unzero
      "Deconstruct an `x : WithZero α` to the underlying value in `α`, given a proof that `x ≠ 0`."]
def unone : ∀ {x : WithOne α}, x ≠ 1 → α 
goal: x ≠ 1 → α

full_name: WithZero.unzero_coe
code: @[to_additive (attr := simp) unzero_coe]
theorem unone_coe {x : α} (hx : (x : WithOne α) ≠ 1) : unone hx = x 
goal: WithZero.unzero hx = x

full_name: WithOne.unone_coe
code: @[to_additive (attr := simp) unzero_coe]
theorem unone_coe {x : α} (hx : (x : WithOne α) ≠ 1) : unone hx = x 
goal: WithOne.unone hx = x

full_name: WithZero.coe_unzero
code: @[to_additive (attr := simp) coe_unzero]
lemma coe_unone : ∀ {x : WithOne α} (hx : x ≠ 1), unone hx = x
  
goal: ↑(WithZero.unzero hx) = x

full_name: WithOne.coe_unone
code: @[to_additive (attr := simp) coe_unzero]
lemma coe_unone : ∀ {x : WithOne α} (hx : x ≠ 1), unone hx = x
  
goal: ↑(WithOne.unone hx) = x

full_name: WithZero.coe_ne_zero
code: @[to_additive (attr := simp)]
theorem coe_ne_one {a : α} : (a : WithOne α) ≠ (1 : WithOne α) 
goal: ↑a ≠ 0

full_name: WithOne.coe_ne_one
code: @[to_additive (attr := simp)]
theorem coe_ne_one {a : α} : (a : WithOne α) ≠ (1 : WithOne α) 
goal: ↑a ≠ 1

full_name: WithZero.zero_ne_coe
code: @[to_additive (attr := simp)]
theorem one_ne_coe {a : α} : (1 : WithOne α) ≠ a 
goal: 0 ≠ ↑a

full_name: WithOne.one_ne_coe
code: @[to_additive (attr := simp)]
theorem one_ne_coe {a : α} : (1 : WithOne α) ≠ a 
goal: 1 ≠ ↑a

full_name: WithOne.ne_one_iff_exists
code: @[to_additive]
theorem ne_one_iff_exists {x : WithOne α} : x ≠ 1 ↔ ∃ a : α, ↑a = x 
goal: x ≠ 1 ↔ ∃ a, ↑a = x

full_name: WithZero.ne_zero_iff_exists
code: @[to_additive]
theorem ne_one_iff_exists {x : WithOne α} : x ≠ 1 ↔ ∃ a : α, ↑a = x 
goal: x ≠ 0 ↔ ∃ a, ↑a = x

full_name: WithOne.canLift
code: @[to_additive]
instance canLift : CanLift (WithOne α) α (↑) fun a => a ≠ 1 
goal: CanLift (WithOne α) α WithOne.coe fun a => a ≠ 1

full_name: WithZero.canLift
code: @[to_additive]
instance canLift : CanLift (WithOne α) α (↑) fun a => a ≠ 1 
goal: CanLift (WithZero α) α WithZero.coe fun a => a ≠ 0

full_name: WithOne.coe_inj
code: @[to_additive (attr := simp, norm_cast)]
theorem coe_inj {a b : α} : (a : WithOne α) = b ↔ a = b 
goal: ↑a = ↑b ↔ a = b

full_name: WithZero.coe_inj
code: @[to_additive (attr := simp, norm_cast)]
theorem coe_inj {a b : α} : (a : WithOne α) = b ↔ a = b 
goal: ↑a = ↑b ↔ a = b

full_name: WithOne.cases_on
code: @[to_additive (attr := elab_as_elim)]
protected theorem cases_on {P : WithOne α → Prop} : ∀ x : WithOne α, P 1 → (∀ a : α, P a) → P x 
goal: P 1 → (∀ (a : α), P ↑a) → P x

full_name: WithZero.cases_on
code: @[to_additive (attr := elab_as_elim)]
protected theorem cases_on {P : WithOne α → Prop} : ∀ x : WithOne α, P 1 → (∀ a : α, P a) → P x 
goal: P 0 → (∀ (a : α), P ↑a) → P x

full_name: WithOne.mulOneClass
code: @[to_additive]
instance mulOneClass [Mul α] : MulOneClass (WithOne α) 
goal: MulOneClass (WithOne α)

full_name: WithZero.addZeroClass
code: @[to_additive]
instance mulOneClass [Mul α] : MulOneClass (WithOne α) 
goal: AddZeroClass (WithZero α)

full_name: WithOne.coe_mul
code: @[to_additive (attr := simp, norm_cast)]
lemma coe_mul [Mul α] (a b : α) : (↑(a * b) : WithOne α) = a * b 
goal: ↑(a * b) = ↑a * ↑b

full_name: WithZero.coe_add
code: @[to_additive (attr := simp, norm_cast)]
lemma coe_mul [Mul α] (a b : α) : (↑(a * b) : WithOne α) = a * b 
goal: ↑(a + b) = ↑a + ↑b

full_name: WithOne.monoid
code: @[to_additive]
instance monoid [Semigroup α] : Monoid (WithOne α) 
goal: Monoid (WithOne α)

full_name: WithZero.addMonoid
code: @[to_additive]
instance monoid [Semigroup α] : Monoid (WithOne α) 
goal: AddMonoid (WithZero α)

full_name: WithZero.addCommMonoid
code: @[to_additive]
instance commMonoid [CommSemigroup α] : CommMonoid (WithOne α) 
goal: AddCommMonoid (WithZero α)

full_name: WithOne.commMonoid
code: @[to_additive]
instance commMonoid [CommSemigroup α] : CommMonoid (WithOne α) 
goal: CommMonoid (WithOne α)

full_name: WithOne.coe_inv
code: @[to_additive (attr := simp, norm_cast)]
theorem coe_inv [Inv α] (a : α) : ((a⁻¹ : α) : WithOne α) = (a : WithOne α)⁻¹ 
goal: ↑a⁻¹ = (↑a)⁻¹

full_name: WithZero.coe_neg
code: @[to_additive (attr := simp, norm_cast)]
theorem coe_inv [Inv α] (a : α) : ((a⁻¹ : α) : WithOne α) = (a : WithOne α)⁻¹ 
goal: ↑(-a) = -↑a