Suppose we take a type

inductive Eg | A | B
-- path inductiondef fun_functional (f : A → B) (x y : A) (EQ : x = y) : f x = f y :=    Eq.recOn EQ (motive := fun k K_EQ_X => f x = f k) rfl
def false_elim (f : False) : α := False.rec f (motive := fun _ => α) 
abbrev Eg.noConfusionType' (x y : Eg) : Prop :=   x.casesOn (motive := fun _ => Prop)    (y.casesOn (motive := fun _ => Prop) True False)    (y.casesOn (motive := fun _ => Prop) False True)
abbrev Eg.noConfusionType'_inhabitant_rfl : Eg.noConfusionType' x x :=     x.casesOn True.intro True.intro
abbrev Eg.def2 (x y : Eg) (NEQ: x ≠ y) (NC: Eg.noConfusionType' x y) : False :=    match H : x with   | .A =>      match K : y with      | .A => NEQ rfl      | .B => NC  | .B => match K :  y with       | .A => NC       | .B => NEQ rfl
  Eg.rec (motive := fun x_1 =>    ∀ (NEQ : x_1 ≠ y) (NC : Eg.noConfusionType' x_1 y), x = x_1 → (fun x NEQ NC => False) x_1 NEQ NC)    (fun NEQ NC H =>      Eg.rec (motive := fun x =>        ∀ (NEQ : Eg.A ≠ x) (NC : Eg.noConfusionType' Eg.A x), y = x → (fun y NEQ NC => False) x NEQ NC)        (fun NEQ NC K => NEQ (Eq.refl Eg.A)) (fun NEQ NC K => NC) y NEQ NC (Eq.refl y))    (fun NEQ NC H =>      Eg.rec (motive := fun x =>        ∀ (NEQ : Eg.B ≠ x) (NC : Eg.noConfusionType' Eg.B x), y = x → (fun y NEQ NC => False) x NEQ NC)        (fun NEQ NC K => NC) (fun NEQ NC K => NEQ (Eq.refl Eg.B)) y NEQ NC (Eq.refl y))    x NEQ NC (Eq.refl x)