Theorem: Equiv.optionSubtype_apply_symm_apply
File: Mathlib/Logic/Equiv/Option.lean

tactic: dsimp only [optionSubtype]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.18695
inst✝ : DecidableEq β
x : β
e : { e // ↑e none = x }
b : { y // y ≠ x }
⊢ some (↑(↑(optionSubtype x) e).symm b) = ↑(↑e).symm ↑b

tactic: simp
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.18695
inst✝ : DecidableEq β
x : β
e : { e // ↑e none = x }
b : { y // y ≠ x }
⊢ some
      (↑(↑{
                  toFun := fun e =>
                    { toFun := fun a => { val := ↑↑e (some a), property := (_ : ↑↑e (some a) ≠ x) },
                      invFun := fun b => Option.get (↑(↑e).symm ↑b) (_ : isSome (↑(↑e).symm ↑b) = true),
                      left_inv :=
                        (_ :
                          ∀ (a : α),
                            (fun b => Option.get (↑(↑e).symm ↑b) (_ : isSome (↑(↑e).symm ↑b) = true))
                                ((fun a => { val := ↑↑e (some a), property := (_ : ↑↑e (some a) ≠ x) }) a) =
                              a),
                      right_inv :=
                        (_ :
                          ∀ (b : { y // y ≠ x }),
                            (fun a => { val := ↑↑e (some a), property := (_ : ↑↑e (some a) ≠ x) })
                                ((fun b => Option.get (↑(↑e).symm ↑b) (_ : isSome (↑(↑e).symm ↑b) = true)) b) =
                              b) },
                  invFun := fun e =>
                    {
                      val :=
                        { toFun := fun a => casesOn' a x (Subtype.val ∘ ↑e),
                          invFun := fun b => if h : b = x then none else some (↑e.symm { val := b, property := h }),
                          left_inv :=
                            (_ :
                              ∀ (a : Option α),
                                (fun b => if h : b = x then none else some (↑e.symm { val := b, property := h }))
                                    ((fun a => casesOn' a x (Subtype.val ∘ ↑e)) a) =
                                  a),
                          right_inv :=
                            (_ :
                              ∀ (b : β),
                                (fun a => casesOn' a x (Subtype.val ∘ ↑e))
                                    ((fun b => if h : b = x then none else some (↑e.symm { val := b, property := h }))
                                      b) =
                                  b) },
                      property :=
                        (_ :
                          ↑{ toFun := fun a => casesOn' a x (Subtype.val ∘ ↑e),
                                  invFun := fun b =>
                                    if h : b = x then none else some (↑e.symm { val := b, property := h }),
                                  left_inv :=
                                    (_ :
                                      ∀ (a : Option α),
                                        (fun b =>
                                              if h : b = x then none else some (↑e.symm { val := b, property := h }))
                                            ((fun a => casesOn' a x (Subtype.val ∘ ↑e)) a) =
                                          a),
                                  right_inv :=
                                    (_ :
                                      ∀ (b : β),
                                        (fun a => casesOn' a x (Subtype.val ∘ ↑e))
                                            ((fun b =>
                                                if h : b = x then none else some (↑e.symm { val := b, property := h }))
                                              b) =
                                          b) }
                              none =
                            ↑{ toFun := fun a => casesOn' a x (Subtype.val ∘ ↑e),
                                  invFun := fun b =>
                                    if h : b = x then none else some (↑e.symm { val := b, property := h }),
                                  left_inv :=
                                    (_ :
                                      ∀ (a : Option α),
                                        (fun b =>
                                              if h : b = x then none else some (↑e.symm { val := b, property := h }))
                                            ((fun a => casesOn' a x (Subtype.val ∘ ↑e)) a) =
                                          a),
                                  right_inv :=
                                    (_ :
                                      ∀ (b : β),
                                        (fun a => casesOn' a x (Subtype.val ∘ ↑e))
                                            ((fun b =>
                                                if h : b = x then none else some (↑e.symm { val := b, property := h }))
                                              b) =
                                          b) }
                              none) },
                  left_inv :=
                    (_ :
                      ∀ (e : { e // ↑e none = x }),
                        (fun e =>
                              {
                                val :=
                                  { toFun := fun a => casesOn' a x (Subtype.val ∘ ↑e),
                                    invFun := fun b =>
                                      if h : b = x then none else some (↑e.symm { val := b, property := h }),
                                    left_inv :=
                                      (_ :
                                        ∀ (a : Option α),
                                          (fun b =>
                                                if h : b = x then none else some (↑e.symm { val := b, property := h }))
                                              ((fun a => casesOn' a x (Subtype.val ∘ ↑e)) a) =
                                            a),
                                    right_inv :=
                                      (_ :
                                        ∀ (b : β),
                                          (fun a => casesOn' a x (Subtype.val ∘ ↑e))
                                              ((fun b =>
                                                  if h : b = x then none
                                                  else some (↑e.symm { val := b, property := h }))
                                                b) =
                                            b) },
                                property :=
                                  (_ :
                                    ↑{ toFun := fun a => casesOn' a x (Subtype.val ∘ ↑e),
                                            invFun := fun b =>
                                              if h : b = x then none else some (↑e.symm { val := b, property := h }),
                                            left_inv :=
                                              (_ :
                                                ∀ (a : Option α),
                                                  (fun b =>
                                                        if h : b = x then none
                                                        else some (↑e.symm { val := b, property := h }))
                                                      ((fun a => casesOn' a x (Subtype.val ∘ ↑e)) a) =
                                                    a),
                                            right_inv :=
                                              (_ :
                                                ∀ (b : β),
                                                  (fun a => casesOn' a x (Subtype.val ∘ ↑e))
                                                      ((fun b =>
                                                          if h : b = x then none
                                                          else some (↑e.symm { val := b, property := h }))
                                                        b) =
                                                    b) }
                                        none =
                                      ↑{ toFun := fun a => casesOn' a x (Subtype.val ∘ ↑e),
                                            invFun := fun b =>
                                              if h : b = x then none else some (↑e.symm { val := b, property := h }),
                                            left_inv :=
                                              (_ :
                                                ∀ (a : Option α),
                                                  (fun b =>
                                                        if h : b = x then none
                                                        else some (↑e.symm { val := b, property := h }))
                                                      ((fun a => casesOn' a x (Subtype.val ∘ ↑e)) a) =
                                                    a),
                                            right_inv :=
                                              (_ :
                                                ∀ (b : β),
                                                  (fun a => casesOn' a x (Subtype.val ∘ ↑e))
                                                      ((fun b =>
                                                          if h : b = x then none
                                                          else some (↑e.symm { val := b, property := h }))
                                                        b) =
                                                    b) }
                                        none) })
                            ((fun e =>
                                { toFun := fun a => { val := ↑↑e (some a), property := (_ : ↑↑e (some a) ≠ x) },
                                  invFun := fun b => Option.get (↑(↑e).symm ↑b) (_ : isSome (↑(↑e).symm ↑b) = true),
                                  left_inv :=
                                    (_ :
                                      ∀ (a : α),
                                        (fun b => Option.get (↑(↑e).symm ↑b) (_ : isSome (↑(↑e).symm ↑b) = true))
                                            ((fun a => { val := ↑↑e (some a), property := (_ : ↑↑e (some a) ≠ x) }) a) =
                                          a),
                                  right_inv :=
                                    (_ :
                                      ∀ (b : { y // y ≠ x }),
                                        (fun a => { val := ↑↑e (some a), property := (_ : ↑↑e (some a) ≠ x) })
                                            ((fun b => Option.get (↑(↑e).symm ↑b) (_ : isSome (↑(↑e).symm ↑b) = true))
                                              b) =
                                          b) })
                              e) =
                          e),
                  right_inv :=
                    (_ :
                      ∀ (e : α ≃ { y // y ≠ x }),
                        (fun e =>
                              { toFun := fun a => { val := ↑↑e (some a), property := (_ : ↑↑e (some a) ≠ x) },
                                invFun := fun b => Option.get (↑(↑e).symm ↑b) (_ : isSome (↑(↑e).symm ↑b) = true),
                                left_inv :=
                                  (_ :
                                    ∀ (a : α),
                                      (fun b => Option.get (↑(↑e).symm ↑b) (_ : isSome (↑(↑e).symm ↑b) = true))
                                          ((fun a => { val := ↑↑e (some a), property := (_ : ↑↑e (some a) ≠ x) }) a) =
                                        a),
                                right_inv :=
                                  (_ :
                                    ∀ (b : { y // y ≠ x }),
                                      (fun a => { val := ↑↑e (some a), property := (_ : ↑↑e (some a) ≠ x) })
                                          ((fun b => Option.get (↑(↑e).symm ↑b) (_ : isSome (↑(↑e).symm ↑b) = true))
                                            b) =
                                        b) })
                            ((fun e =>
                                {
                                  val :=
                                    { toFun := fun a => casesOn' a x (Subtype.val ∘ ↑e),
                                      invFun := fun b =>
                                        if h : b = x then none else some (↑e.symm { val := b, property := h }),
                                      left_inv :=
                                        (_ :
                                          ∀ (a : Option α),
                                            (fun b =>
                                                  if h : b = x then none
                                                  else some (↑e.symm { val := b, property := h }))
                                                ((fun a => casesOn' a x (Subtype.val ∘ ↑e)) a) =
                                              a),
                                      right_inv :=
                                        (_ :
                                          ∀ (b : β),
                                            (fun a => casesOn' a x (Subtype.val ∘ ↑e))
                                                ((fun b =>
                                                    if h : b = x then none
                                                    else some (↑e.symm { val := b, property := h }))
                                                  b) =
                                              b) },
                                  property :=
                                    (_ :
                                      ↑{ toFun := fun a => casesOn' a x (Subtype.val ∘ ↑e),
                                              invFun := fun b =>
                                                if h : b = x then none else some (↑e.symm { val := b, property := h }),
                                              left_inv :=
                                                (_ :
                                                  ∀ (a : Option α),
                                                    (fun b =>
                                                          if h : b = x then none
                                                          else some (↑e.symm { val := b, property := h }))
                                                        ((fun a => casesOn' a x (Subtype.val ∘ ↑e)) a) =
                                                      a),
                                              right_inv :=
                                                (_ :
                                                  ∀ (b : β),
                                                    (fun a => casesOn' a x (Subtype.val ∘ ↑e))
                                                        ((fun b =>
                                                            if h : b = x then none
                                                            else some (↑e.symm { val := b, property := h }))
                                                          b) =
                                                      b) }
                                          none =
                                        ↑{ toFun := fun a => casesOn' a x (Subtype.val ∘ ↑e),
                                              invFun := fun b =>
                                                if h : b = x then none else some (↑e.symm { val := b, property := h }),
                                              left_inv :=
                                                (_ :
                                                  ∀ (a : Option α),
                                                    (fun b =>
                                                          if h : b = x then none
                                                          else some (↑e.symm { val := b, property := h }))
                                                        ((fun a => casesOn' a x (Subtype.val ∘ ↑e)) a) =
                                                      a),
                                              right_inv :=
                                                (_ :
                                                  ∀ (b : β),
                                                    (fun a => casesOn' a x (Subtype.val ∘ ↑e))
                                                        ((fun b =>
                                                            if h : b = x then none
                                                            else some (↑e.symm { val := b, property := h }))
                                                          b) =
                                                      b) }
                                          none) })
                              e) =
                          e) }
              e).symm
        b) =
    ↑(↑e).symm ↑b