File: Mathlib/Logic/Equiv/Option.lean

full_name: Equiv.optionCongr
code: /-- A universe-polymorphic version of `EquivFunctor.mapEquiv Option e`. -/
@[simps apply]
def optionCongr (e : α ≃ β) : Option α ≃ Option β 
goal: Option α ≃ Option β

full_name: Equiv.optionCongr_apply
code: /-- A universe-polymorphic version of `EquivFunctor.mapEquiv Option e`. -/
@[simps apply]
def optionCongr (e : α ≃ β) : Option α ≃ Option β 
goal: ∀ (a : Option α), e.optionCongr a = Option.map (⇑e) a

full_name: Equiv.optionCongr_refl
code: @[simp]
theorem optionCongr_refl : optionCongr (Equiv.refl α) = Equiv.refl _ 
goal: (Equiv.refl α).optionCongr = Equiv.refl (Option α)

full_name: Equiv.optionCongr_symm
code: @[simp]
theorem optionCongr_symm (e : α ≃ β) : (optionCongr e).symm = optionCongr e.symm 
goal: e.optionCongr.symm = e.symm.optionCongr

full_name: Equiv.optionCongr_trans
code: @[simp]
theorem optionCongr_trans (e₁ : α ≃ β) (e₂ : β ≃ γ) :
    (optionCongr e₁).trans (optionCongr e₂) = optionCongr (e₁.trans e₂) 
goal: e₁.optionCongr.trans e₂.optionCongr = (e₁.trans e₂).optionCongr

full_name: Equiv.optionCongr_eq_equivFunctor_mapEquiv
code: /-- When `α` and `β` are in the same universe, this is the same as the result of
`EquivFunctor.mapEquiv`. -/
theorem optionCongr_eq_equivFunctor_mapEquiv {α β : Type u} (e : α ≃ β) :
    optionCongr e = EquivFunctor.mapEquiv Option e 
goal: e.optionCongr = EquivFunctor.mapEquiv Option e

full_name: Equiv.removeNone_aux
code: /-- If we have a value on one side of an `Equiv` of `Option`
    we also have a value on the other side of the equivalence
-/
def removeNone_aux (x : α) : β 
goal: β

full_name: Equiv.removeNone_aux_some
code: theorem removeNone_aux_some {x : α} (h : ∃ x', e (some x) = some x') :
    some (removeNone_aux e x) = e (some x) 
goal: some (e.removeNone_aux x) = e (some x)

full_name: Equiv.removeNone_aux_none
code: theorem removeNone_aux_none {x : α} (h : e (some x) = none) :
    some (removeNone_aux e x) = e none 
goal: some (e.removeNone_aux x) = e none

full_name: Equiv.removeNone_aux_inv
code: theorem removeNone_aux_inv (x : α) : removeNone_aux e.symm (removeNone_aux e x) = x 
goal: e.symm.removeNone_aux (e.removeNone_aux x) = x

full_name: Equiv.removeNone
code: /-- Given an equivalence between two `Option` types, eliminate `none` from that equivalence by
mapping `e.symm none` to `e none`. -/
def removeNone : α ≃ β 
goal: α ≃ β

full_name: Equiv.removeNone_symm
code: @[simp]
theorem removeNone_symm : (removeNone e).symm = removeNone e.symm 
goal: e.removeNone.symm = e.symm.removeNone

full_name: Equiv.removeNone_some
code: theorem removeNone_some {x : α} (h : ∃ x', e (some x) = some x') :
    some (removeNone e x) = e (some x) 
goal: some (e.removeNone x) = e (some x)

full_name: Equiv.removeNone_none
code: theorem removeNone_none {x : α} (h : e (some x) = none) : some (removeNone e x) = e none 
goal: some (e.removeNone x) = e none

full_name: Equiv.option_symm_apply_none_iff
code: @[simp]
theorem option_symm_apply_none_iff : e.symm none = none ↔ e none = none 
goal: e.symm none = none ↔ e none = none

full_name: Equiv.some_removeNone_iff
code: theorem some_removeNone_iff {x : α} : some (removeNone e x) = e none ↔ e.symm none = some x 
goal: some (e.removeNone x) = e none ↔ e.symm none = some x

full_name: Equiv.removeNone_optionCongr
code: @[simp]
theorem removeNone_optionCongr (e : α ≃ β) : removeNone e.optionCongr = e 
goal: e.optionCongr.removeNone = e

full_name: Equiv.optionCongr_injective
code: theorem optionCongr_injective : Function.Injective (optionCongr : α ≃ β → Option α ≃ Option β) 
goal: Function.Injective Equiv.optionCongr

full_name: Equiv.optionSubtype
code: /-- Equivalences between `Option α` and `β` that send `none` to `x` are equivalent to
equivalences between `α` and `{y : β // y ≠ x}`. -/
def optionSubtype [DecidableEq β] (x : β) :
    { e : Option α ≃ β // e none = x } ≃ (α ≃ { y : β // y ≠ x }) 
goal: { e // e none = x } ≃ (α ≃ { y // y ≠ x })

full_name: Equiv.optionSubtype_apply_apply
code: @[simp]
theorem optionSubtype_apply_apply
    [DecidableEq β] (x : β)
    (e : { e : Option α ≃ β // e none = x })
    (a : α)
    (h) : optionSubtype x e a = ⟨(e : Option α ≃ β) a, h⟩ 
goal: ((Equiv.optionSubtype x) e) a = ⟨↑e (some a), h⟩

full_name: Equiv.coe_optionSubtype_apply_apply
code: @[simp]
theorem coe_optionSubtype_apply_apply
    [DecidableEq β] (x : β)
    (e : { e : Option α ≃ β // e none = x })
    (a : α) : ↑(optionSubtype x e a) = (e : Option α ≃ β) a 
goal: ↑(((Equiv.optionSubtype x) e) a) = ↑e (some a)

full_name: Equiv.optionSubtype_apply_symm_apply
code: @[simp]
theorem optionSubtype_apply_symm_apply
    [DecidableEq β] (x : β)
    (e : { e : Option α ≃ β // e none = x })
    (b : { y : β // y ≠ x }) : ↑((optionSubtype x e).symm b) = (e : Option α ≃ β).symm b 
goal: some (((Equiv.optionSubtype x) e).symm b) = (↑e).symm ↑b

full_name: Equiv.optionSubtype_symm_apply_apply_coe
code: @[simp]
theorem optionSubtype_symm_apply_apply_coe [DecidableEq β] (x : β) (e : α ≃ { y : β // y ≠ x })
    (a : α) : ((optionSubtype x).symm e : Option α ≃ β) a = e a 
goal: ↑((Equiv.optionSubtype x).symm e) (some a) = ↑(e a)

full_name: Equiv.optionSubtype_symm_apply_apply_some
code: @[simp]
theorem optionSubtype_symm_apply_apply_some
    [DecidableEq β]
    (x : β)
    (e : α ≃ { y : β // y ≠ x })
    (a : α) : ((optionSubtype x).symm e : Option α ≃ β) (some a) = e a 
goal: ↑((Equiv.optionSubtype x).symm e) (some a) = ↑(e a)

full_name: Equiv.optionSubtype_symm_apply_apply_none
code: @[simp]
theorem optionSubtype_symm_apply_apply_none
    [DecidableEq β]
    (x : β)
    (e : α ≃ { y : β // y ≠ x }) : ((optionSubtype x).symm e : Option α ≃ β) none = x 
goal: ↑((Equiv.optionSubtype x).symm e) none = x

full_name: Equiv.optionSubtype_symm_apply_symm_apply
code: @[simp]
theorem optionSubtype_symm_apply_symm_apply [DecidableEq β] (x : β) (e : α ≃ { y : β // y ≠ x })
    (b : { y : β // y ≠ x }) : ((optionSubtype x).symm e : Option α ≃ β).symm b = e.symm b 
goal: (↑((Equiv.optionSubtype x).symm e)).symm ↑b = some (e.symm b)

full_name: Equiv.optionSubtypeNe_apply
code: /-- Any type with a distinguished element is equivalent to an `Option` type on the subtype excluding
that element. -/
@[simps!]
def optionSubtypeNe (a : α) : Option {b // b ≠ a} ≃ α 
goal: ∀ (a_1 : Option { y // y ≠ a }), (Equiv.optionSubtypeNe a) a_1 = a_1.casesOn' a Subtype.val

full_name: Equiv.optionSubtypeNe
code: /-- Any type with a distinguished element is equivalent to an `Option` type on the subtype excluding
that element. -/
@[simps!]
def optionSubtypeNe (a : α) : Option {b // b ≠ a} ≃ α 
goal: Option { b // b ≠ a } ≃ α

full_name: Equiv.optionSubtypeNe_symm_apply
code: /-- Any type with a distinguished element is equivalent to an `Option` type on the subtype excluding
that element. -/
@[simps!]
def optionSubtypeNe (a : α) : Option {b // b ≠ a} ≃ α 
goal: (Equiv.optionSubtypeNe a).symm b = if h : b = a then none else some ⟨b, h⟩

full_name: Equiv.optionSubtypeNe_symm_self
code: lemma optionSubtypeNe_symm_self (a : α) : (optionSubtypeNe a).symm a = none 
goal: (Equiv.optionSubtypeNe a).symm a = none

full_name: Equiv.optionSubtypeNe_symm_of_ne
code: lemma optionSubtypeNe_symm_of_ne (hba : b ≠ a) : (optionSubtypeNe a).symm b = some ⟨b, hba⟩ 
goal: (Equiv.optionSubtypeNe a).symm b = some ⟨b, hba⟩

full_name: Equiv.optionSubtypeNe_none
code: @[simp] lemma optionSubtypeNe_none (a : α) : optionSubtypeNe a none = a 
goal: (Equiv.optionSubtypeNe a) none = a

full_name: Equiv.optionSubtypeNe_some
code: @[simp] lemma optionSubtypeNe_some (a : α) (b) : optionSubtypeNe a (some b) = b 
goal: (Equiv.optionSubtypeNe a) (some b) = ↑b