awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.Data.WSeq.Relation (goal)
Goal:
α : Type u
β : Type v
R : α → β → Prop
s1_1 s2 : WSeq α
t1_1 t2 : WSeq β
h1 : LiftRel R s1_1 t1_1
h2 : LiftRel R s2 t2
s : WSeq α
t : WSeq β
h_1 :
  (fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α) (t1 : WSeq β), s = s1.append s2 ∧ t = t1.append t2 ∧ LiftRel R s1 t1)
    s t
s1 : WSeq α
t1 : WSeq β
h_2 : LiftRel R s1 t1
p : Option (β × WSeq β)
h : LiftRelO R (LiftRel R) none p
⊢ Computation.LiftRel
    (LiftRelO R fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
    (destruct_append.aux s2 none) (destruct_append.aux t2 p)
have none : ∀ (h : LiftRelO R (LiftRel R) none none),
  Computation.LiftRel
    (LiftRelO R fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
    (destruct_append.aux s2 none) (destruct_append.aux t2 none)
Tactic: rcases p with - | b
Cleared hypotheses: p, h
-- Lean 4 proof step from Mathlib.Data.WSeq.Relation (goal)
Goal:
α : Type u
β : Type v
R : α → β → Prop
s1_1 s2 : WSeq α
t1_1 t2 : WSeq β
h1 : LiftRel R s1_1 t1_1
h2 : LiftRel R s2 t2
s : WSeq α
t : WSeq β
h_1 :
  (fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α) (t1 : WSeq β), s = s1.append s2 ∧ t = t1.append t2 ∧ LiftRel R s1 t1)
    s t
s1 : WSeq α
t1 : WSeq β
h_2 : LiftRel R s1 t1
p : Option (β × WSeq β)
h : LiftRelO R (LiftRel R) Option.none p
none :
  ∀ (h : LiftRelO R (LiftRel R) Option.none Option.none),
    Computation.LiftRel
      (LiftRelO R fun (s : WSeq α) (t : WSeq β) ↦
        LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
      (destruct_append.aux s2 Option.none) (destruct_append.aux t2 Option.none)
⊢ Computation.LiftRel
    (LiftRelO R fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
    (destruct_append.aux s2 Option.none) (destruct_append.aux t2 p)
have none₁ : ∀ (b : β × WSeq β) (h : LiftRelO R (LiftRel R) Option.none (some b)),
  Computation.LiftRel
    (LiftRelO R fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
    (destruct_append.aux s2 Option.none) (destruct_append.aux t2 (some b))
Tactic: rcases p with - | b
Cleared hypotheses: p, h
-- Lean 4 proof step from Mathlib.Data.WSeq.Relation (goal)
Goal:
α : Type u
β : Type v
R : α → β → Prop
s1_1 s2 : WSeq α
t1_1 t2 : WSeq β
h1 : LiftRel R s1_1 t1_1
h2 : LiftRel R s2 t2
s : WSeq α
t : WSeq β
h_1 :
  (fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α) (t1 : WSeq β), s = s1.append s2 ∧ t = t1.append t2 ∧ LiftRel R s1 t1)
    s t
s1 : WSeq α
t1 : WSeq β
h_2 : LiftRel R s1 t1
p : Option (β × WSeq β)
a : α × WSeq α
h : LiftRelO R (LiftRel R) (some a) p
⊢ Computation.LiftRel
    (LiftRelO R fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
    (destruct_append.aux s2 (some a)) (destruct_append.aux t2 p)
have some : ∀ (h : LiftRelO R (LiftRel R) (some a) none),
  Computation.LiftRel
    (LiftRelO R fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
    (destruct_append.aux s2 (some a)) (destruct_append.aux t2 none)
Tactic: rcases p with - | b
Cleared hypotheses: p, h
-- Lean 4 proof step from Mathlib.Data.WSeq.Relation (goal)
Goal:
α : Type u
β : Type v
R : α → β → Prop
s1_1 s2 : WSeq α
t1_1 t2 : WSeq β
h1 : LiftRel R s1_1 t1_1
h2 : LiftRel R s2 t2
s : WSeq α
t : WSeq β
h_1 :
  (fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α) (t1 : WSeq β), s = s1.append s2 ∧ t = t1.append t2 ∧ LiftRel R s1 t1)
    s t
s1 : WSeq α
t1 : WSeq β
h_2 : LiftRel R s1 t1
p : Option (β × WSeq β)
a : α × WSeq α
h : LiftRelO R (LiftRel R) (Option.some a) p
some :
  ∀ (h : LiftRelO R (LiftRel R) (Option.some a) none),
    Computation.LiftRel
      (LiftRelO R fun (s : WSeq α) (t : WSeq β) ↦
        LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
      (destruct_append.aux s2 (Option.some a)) (destruct_append.aux t2 none)
⊢ Computation.LiftRel
    (LiftRelO R fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
    (destruct_append.aux s2 (Option.some a)) (destruct_append.aux t2 p)
have some₁ : ∀ (b : β × WSeq β) (h : LiftRelO R (LiftRel R) (Option.some a) (Option.some b)),
  Computation.LiftRel
    (LiftRelO R fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
    (destruct_append.aux s2 (Option.some a)) (destruct_append.aux t2 (Option.some b))
Tactic: rcases p with - | b
Cleared hypotheses: p, h
-- Lean 4 proof step from Mathlib.Data.WSeq.Relation (goal)
Goal:
α : Type u
β : Type v
R : α → β → Prop
s1_1 s2 : WSeq α
t1_1 t2 : WSeq β
h1 : LiftRel R s1_1 t1_1
h2 : LiftRel R s2 t2
s : WSeq α
t : WSeq β
h_1 :
  (fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α) (t1 : WSeq β), s = s1.append s2 ∧ t = t1.append t2 ∧ LiftRel R s1 t1)
    s t
s1 : WSeq α
t1 : WSeq β
h_2 : LiftRel R s1 t1
h : LiftRelO R (LiftRel R) none none
⊢ Computation.LiftRel
    (LiftRelO R fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
    s2.destruct t2.destruct
have apply : ∀ {a : Option (α × WSeq α)} {b : Option (β × WSeq β)},
  LiftRelO R (LiftRel R) a b →
    LiftRelO R
      (fun (s : WSeq α) (t : WSeq β) ↦
        LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
      a b
Tactic: apply Computation.LiftRel.imp _ _ _ (liftRel_destruct h2)
-- Lean 4 proof step from Mathlib.Data.WSeq.Relation (goal)
Goal:
α : Type u
β : Type v
R : α → β → Prop
s1_1 s2 : WSeq α
t1_1 t2 : WSeq β
h1 : LiftRel R s1_1 t1_1
h2 : LiftRel R s2 t2
s : WSeq α
t : WSeq β
h_1 :
  (fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α) (t1 : WSeq β), s = s1.append s2 ∧ t = t1.append t2 ∧ LiftRel R s1 t1)
    s t
s1 : WSeq α
t1 : WSeq β
h_2 : LiftRel R s1 t1
h : LiftRelO R (LiftRel R) none none
a : Option (α × WSeq α)
b : Option (β × WSeq β)
⊢ LiftRelO R (LiftRel R) a b →
    LiftRelO R
      (fun (s : WSeq α) (t : WSeq β) ↦
        LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
      a b
have H : ∀ (s : WSeq α) (t : WSeq β),
  LiftRel R s t → LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x
Tactic: apply LiftRelO.imp_right
-- Lean 4 proof step from Mathlib.Data.WSeq.Relation (goal)
Goal:
α : Type u
β : Type v
R : α → β → Prop
s1_1 s2 : WSeq α
t1_1 t2 : WSeq β
h1 : LiftRel R s1_1 t1_1
h2 : LiftRel R s2 t2
s : WSeq α
t : WSeq β
h_1 :
  (fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α) (t1 : WSeq β), s = s1.append s2 ∧ t = t1.append t2 ∧ LiftRel R s1 t1)
    s t
s1 : WSeq α
t1 : WSeq β
h_2 : LiftRel R s1 t1
b : β × WSeq β
h : LiftRelO R (LiftRel R) none (some b)
⊢ Computation.LiftRel
    (LiftRelO R fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
    (destruct_append.aux s2 none) (destruct_append.aux t2 (some b))
have none : ∀ (fst : β) (snd : WSeq β) (h : LiftRelO R (LiftRel R) none (some (fst, snd))),
  Computation.LiftRel
    (LiftRelO R fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
    (destruct_append.aux s2 none) (destruct_append.aux t2 (some (fst, snd)))
Tactic: cases b
Cleared hypotheses: b, h
-- Lean 4 proof step from Mathlib.Data.WSeq.Relation (goal)
Goal:
α : Type u
β : Type v
R : α → β → Prop
s1_1 s2 : WSeq α
t1_1 t2 : WSeq β
h1 : LiftRel R s1_1 t1_1
h2 : LiftRel R s2 t2
s : WSeq α
t : WSeq β
h_1 :
  (fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α) (t1 : WSeq β), s = s1.append s2 ∧ t = t1.append t2 ∧ LiftRel R s1 t1)
    s t
s1 : WSeq α
t1 : WSeq β
h_2 : LiftRel R s1 t1
a : α × WSeq α
h : LiftRelO R (LiftRel R) (some a) none
⊢ Computation.LiftRel
    (LiftRelO R fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
    (destruct_append.aux s2 (some a)) (destruct_append.aux t2 none)
have some : ∀ (fst : α) (snd : WSeq α) (h : LiftRelO R (LiftRel R) (some (fst, snd)) none),
  Computation.LiftRel
    (LiftRelO R fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
    (destruct_append.aux s2 (some (fst, snd))) (destruct_append.aux t2 none)
Tactic: cases a
Cleared hypotheses: a, h
-- Lean 4 proof step from Mathlib.Data.WSeq.Relation (goal)
Goal:
α : Type u
β : Type v
R : α → β → Prop
s1_1 s2 : WSeq α
t1_1 t2 : WSeq β
h1 : LiftRel R s1_1 t1_1
h2 : LiftRel R s2 t2
s : WSeq α
t : WSeq β
h_1 :
  (fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α) (t1 : WSeq β), s = s1.append s2 ∧ t = t1.append t2 ∧ LiftRel R s1 t1)
    s t
s1 : WSeq α
t1 : WSeq β
h_2 : LiftRel R s1 t1
a : α × WSeq α
b : β × WSeq β
h : LiftRelO R (LiftRel R) (some a) (some b)
⊢ Computation.LiftRel
    (LiftRelO R fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
    (destruct_append.aux s2 (some a)) (destruct_append.aux t2 (some b))
have some : ∀ (a : α) (s : WSeq α) (h : LiftRelO R (LiftRel R) (some (a, s)) (some b)),
  Computation.LiftRel
    (LiftRelO R fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
    (destruct_append.aux s2 (some (a, s))) (destruct_append.aux t2 (some b))
Tactic: obtain ⟨a, s⟩ := a
Cleared hypotheses: a, h
-- Lean 4 proof step from Mathlib.Data.WSeq.Relation (goal)
Goal:
α : Type u
β : Type v
R : α → β → Prop
s1_1 s2 : WSeq α
t1_1 t2 : WSeq β
h1 : LiftRel R s1_1 t1_1
h2 : LiftRel R s2 t2
s_1 : WSeq α
t : WSeq β
h_1 :
  (fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α) (t1 : WSeq β), s = s1.append s2 ∧ t = t1.append t2 ∧ LiftRel R s1 t1)
    s_1 t
s1 : WSeq α
t1 : WSeq β
h_2 : LiftRel R s1 t1
b : β × WSeq β
a : α
s : WSeq α
h : LiftRelO R (LiftRel R) (some (a, s)) (some b)
⊢ Computation.LiftRel
    (LiftRelO R fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
    (destruct_append.aux s2 (some (a, s))) (destruct_append.aux t2 (some b))
have some : ∀ (b : β) (t : WSeq β) (h : LiftRelO R (LiftRel R) (some (a, s)) (some (b, t))),
  Computation.LiftRel
    (LiftRelO R fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
    (destruct_append.aux s2 (some (a, s))) (destruct_append.aux t2 (some (b, t)))
Tactic: obtain ⟨b, t⟩ := b
Cleared hypotheses: b, h
-- Lean 4 proof step from Mathlib.Data.WSeq.Relation (hypothesis)
Goal:
α : Type u
β : Type v
R : α → β → Prop
s1_1 s2 : WSeq α
t1_1 t2 : WSeq β
h1 : LiftRel R s1_1 t1_1
h2 : LiftRel R s2 t2
s_1 : WSeq α
t_1 : WSeq β
h_1 :
  (fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α) (t1 : WSeq β), s = s1.append s2 ∧ t = t1.append t2 ∧ LiftRel R s1 t1)
    s_1 t_1
s1 : WSeq α
t1 : WSeq β
h_2 : LiftRel R s1 t1
a : α
s : WSeq α
b : β
t : WSeq β
h : LiftRelO R (LiftRel R) (some (a, s)) (some (b, t))
⊢ Computation.LiftRel
    (LiftRelO R fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
    (destruct_append.aux s2 (some (a, s))) (destruct_append.aux t2 (some (b, t)))
have r : R a b
Tactic: obtain ⟨r, h⟩ := h
Cleared hypotheses: h
-- Lean 4 proof step from Mathlib.Data.WSeq.Relation (hypothesis)
Goal:
α : Type u
β : Type v
R : α → β → Prop
s1_1 s2 : WSeq α
t1_1 t2 : WSeq β
h1 : LiftRel R s1_1 t1_1
h2 : LiftRel R s2 t2
s_1 : WSeq α
t_1 : WSeq β
h_1 :
  (fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α) (t1 : WSeq β), s = s1.append s2 ∧ t = t1.append t2 ∧ LiftRel R s1 t1)
    s_1 t_1
s1 : WSeq α
t1 : WSeq β
h_2 : LiftRel R s1 t1
a : α
s : WSeq α
b : β
t : WSeq β
h : LiftRelO R (LiftRel R) (some (a, s)) (some (b, t))
r : R a b
⊢ Computation.LiftRel
    (LiftRelO R fun (s : WSeq α) (t : WSeq β) ↦
      LiftRel R s t ∨ ∃ (s1 : WSeq α), s = s1.append s2 ∧ ∃ (x : WSeq β), t = x.append t2 ∧ LiftRel R s1 x)
    (destruct_append.aux s2 (some (a, s))) (destruct_append.aux t2 (some (b, t)))
have h₁ : LiftRel R s t
Tactic: obtain ⟨r, h⟩ := h
Cleared hypotheses: h
-- Lean 4 proof step from Mathlib.Data.WSeq.Relation (goal)
Goal:
α : Type u
β : Type v
R : α → β → Prop
S : WSeq (WSeq α)
T : WSeq (WSeq β)
U : WSeq α → WSeq β → Prop
ST : LiftRel (LiftRel R) S T
HU :
  ∀ (s1 : WSeq α) (s2 : WSeq β),
    (∃ (s : WSeq α) (t : WSeq β) (S : WSeq (WSeq α)) (T : WSeq (WSeq β)),
        s1 = s.append S.join ∧ s2 = t.append T.join ∧ LiftRel R s t ∧ LiftRel (LiftRel R) S T) →
      U s1 s2
a : Option (α × WSeq α)
ma : a ∈ S.join.destruct
⊢ ∃ b ∈ T.join.destruct, LiftRelO R U a b
have obtain : ∀ (n : ℕ) (h : S.join.destruct.Results a n), ∃ b ∈ T.join.destruct, LiftRelO R U a b
Tactic: obtain ⟨n, h⟩ := exists_results_of_mem ma
-- Lean 4 proof step from Mathlib.Data.WSeq.Relation (goal)
Goal:
α : Type u
β : Type v
R : α → β → Prop
S : WSeq (WSeq α)
T : WSeq (WSeq β)
U : WSeq α → WSeq β → Prop
ST : LiftRel (LiftRel R) S T
HU :
  ∀ (s1 : WSeq α) (s2 : WSeq β),
    (∃ (s : WSeq α) (t : WSeq β) (S : WSeq (WSeq α)) (T : WSeq (WSeq β)),
        s1 = s.append S.join ∧ s2 = t.append T.join ∧ LiftRel R s t ∧ LiftRel (LiftRel R) S T) →
      U s1 s2
a : Option (α × WSeq α)
n : ℕ
h : S.join.destruct.Results a n
⊢ ∃ b ∈ T.join.destruct, LiftRelO R U a b
have revert : ∀ {S : WSeq (WSeq α)} {T : WSeq (WSeq β)} (ST : LiftRel (LiftRel R) S T) {a : Option (α × WSeq α)}
  (h : S.join.destruct.Results a n), ∃ b ∈ T.join.destruct, LiftRelO R U a b
Tactic: revert S T ST a
Cleared hypotheses: S, T, ST, a, h
-- Lean 4 proof step from Mathlib.Data.WSeq.Relation (goal)
Goal:
α : Type u
β : Type v
R : α → β → Prop
U : WSeq α → WSeq β → Prop
HU :
  ∀ (s1 : WSeq α) (s2 : WSeq β),
    (∃ (s : WSeq α) (t : WSeq β) (S : WSeq (WSeq α)) (T : WSeq (WSeq β)),
        s1 = s.append S.join ∧ s2 = t.append T.join ∧ LiftRel R s t ∧ LiftRel (LiftRel R) S T) →
      U s1 s2
n : ℕ
⊢ ∀ {S : WSeq (WSeq α)} {T : WSeq (WSeq β)} (ST : LiftRel (LiftRel R) S T) {a : Option (α × WSeq α)}
    (h : S.join.destruct.Results a n), ∃ b ∈ T.join.destruct, LiftRelO R U a b
have ind : ∀ (n : ℕ)
  (IH :
    ∀ m < n,
      ∀ {S : WSeq (WSeq α)} {T : WSeq (WSeq β)} (ST : LiftRel (LiftRel R) S T) {a : Option (α × WSeq α)}
        (h : S.join.destruct.Results a m), ∃ b ∈ T.join.destruct, LiftRelO R U a b)
  {S : WSeq (WSeq α)} {T : WSeq (WSeq β)} (ST : LiftRel (LiftRel R) S T) {a : Option (α × WSeq α)}
  (h : S.join.destruct.Results a n), ∃ b ∈ T.join.destruct, LiftRelO R U a b
Tactic: induction n using Nat.strongRecOn with | _ n IH
Cleared hypotheses: n
-- Lean 4 proof step from Mathlib.Data.WSeq.Relation (hypothesis)
Goal:
α : Type u
β : Type v
R : α → β → Prop
U : WSeq α → WSeq β → Prop
HU :
  ∀ (s1 : WSeq α) (s2 : WSeq β),
    (∃ (s : WSeq α) (t : WSeq β) (S : WSeq (WSeq α)) (T : WSeq (WSeq β)),
        s1 = s.append S.join ∧ s2 = t.append T.join ∧ LiftRel R s t ∧ LiftRel (LiftRel R) S T) →
      U s1 s2
n : ℕ
IH :
  ∀ m < n,
    ∀ {S : WSeq (WSeq α)} {T : WSeq (WSeq β)} (ST : LiftRel (LiftRel R) S T) {a : Option (α × WSeq α)}
      (h : S.join.destruct.Results a m), ∃ b ∈ T.join.destruct, LiftRelO R U a b
S : WSeq (WSeq α)
T : WSeq (WSeq β)
ST : LiftRel (LiftRel R) S T
a : Option (α × WSeq α)
ra : S.join.destruct.Results a n
⊢ ∃ b ∈ T.join.destruct, LiftRelO R U a b
have ra₁ : (S.destruct.bind destruct_join.aux).Results a n
Tactic: simp only [destruct_join] at ra
Cleared hypotheses: ra
-- Lean 4 proof step from Mathlib.Data.WSeq.Relation (goal)
Goal:
α : Type u
β : Type v
R : α → β → Prop
U : WSeq α → WSeq β → Prop
HU :
  ∀ (s1 : WSeq α) (s2 : WSeq β),
    (∃ (s : WSeq α) (t : WSeq β) (S : WSeq (WSeq α)) (T : WSeq (WSeq β)),
        s1 = s.append S.join ∧ s2 = t.append T.join ∧ LiftRel R s t ∧ LiftRel (LiftRel R) S T) →
      U s1 s2
n : ℕ
IH :
  ∀ m < n,
    ∀ {S : WSeq (WSeq α)} {T : WSeq (WSeq β)} (ST : LiftRel (LiftRel R) S T) {a : Option (α × WSeq α)}
      (h : S.join.destruct.Results a m), ∃ b ∈ T.join.destruct, LiftRelO R U a b
S : WSeq (WSeq α)
T : WSeq (WSeq β)
ST : LiftRel (LiftRel R) S T
a : Option (α × WSeq α)
ra : (S.destruct.bind destruct_join.aux).Results a n
o : Option (WSeq α × WSeq (WSeq α))
m k : ℕ
rs1 : S.destruct.Results o m
rs2_1 : (destruct_join.aux o).Results a k
en : n = k + m
p : Option (WSeq β × WSeq (WSeq β))
mT_1 : p ∈ T.destruct
rop : LiftRelO (LiftRel R) (LiftRel (LiftRel R)) o p
h : LiftRelO (LiftRel R) (LiftRel (LiftRel R)) none none
h_1 : S.destruct.Results none m
rs2 : Results (destruct_join.aux none) a k
mT : none ∈ T.destruct
⊢ ∃ b ∈ T.join.destruct, LiftRelO R U a b
have simp : ∃ b ∈ T.destruct.bind destruct_join.aux, LiftRelO R U a b
Tactic: simp only [destruct_join]
-- Lean 4 proof step from Mathlib.Data.WSeq.Relation (goal)
Goal:
α : Type u
β : Type v
R : α → β → Prop
U : WSeq α → WSeq β → Prop
HU :
  ∀ (s1 : WSeq α) (s2 : WSeq β),
    (∃ (s : WSeq α) (t : WSeq β) (S : WSeq (WSeq α)) (T : WSeq (WSeq β)),
        s1 = s.append S.join ∧ s2 = t.append T.join ∧ LiftRel R s t ∧ LiftRel (LiftRel R) S T) →
      U s1 s2
n : ℕ
IH :
  ∀ m < n,
    ∀ {S : WSeq (WSeq α)} {T : WSeq (WSeq β)} (ST : LiftRel (LiftRel R) S T) {a : Option (α × WSeq α)}
      (h : S.join.destruct.Results a m), ∃ b ∈ T.join.destruct, LiftRelO R U a b
S : WSeq (WSeq α)
T : WSeq (WSeq β)
ST : LiftRel (LiftRel R) S T
a : Option (α × WSeq α)
ra : (S.destruct.bind destruct_join.aux).Results a n
o : Option (WSeq α × WSeq (WSeq α))
m k : ℕ
rs1 : S.destruct.Results o m
rs2_1 : (destruct_join.aux o).Results a k
en : n = k + m
p : Option (WSeq β × WSeq (WSeq β))
mT_1 : p ∈ T.destruct
rop : LiftRelO (LiftRel R) (LiftRel (LiftRel R)) o p
h : LiftRelO (LiftRel R) (LiftRel (LiftRel R)) none none
h_1 : S.destruct.Results none m
rs2 : Results (destruct_join.aux none) a k
mT : none ∈ T.destruct
⊢ LiftRelO R U a none
have rw : LiftRelO R U none none
Tactic: rw [eq_of_pure_mem rs2.mem]
-- Lean 4 proof step from Mathlib.Data.WSeq.Relation (hypothesis)
Goal:
α : Type u
β : Type v
R : α → β → Prop
U : WSeq α → WSeq β → Prop
HU :
  ∀ (s1 : WSeq α) (s2 : WSeq β),
    (∃ (s : WSeq α) (t : WSeq β) (S : WSeq (WSeq α)) (T : WSeq (WSeq β)),
        s1 = s.append S.join ∧ s2 = t.append T.join ∧ LiftRel R s t ∧ LiftRel (LiftRel R) S T) →
      U s1 s2
n : ℕ
IH :
  ∀ m < n,
    ∀ {S : WSeq (WSeq α)} {T : WSeq (WSeq β)} (ST : LiftRel (LiftRel R) S T) {a : Option (α × WSeq α)}
      (h : S.join.destruct.Results a m), ∃ b ∈ T.join.destruct, LiftRelO R U a b
S : WSeq (WSeq α)
T : WSeq (WSeq β)
ST : LiftRel (LiftRel R) S T
a : Option (α × WSeq α)
ra : (S.destruct.bind destruct_join.aux).Results a n
o : Option (WSeq α × WSeq (WSeq α))
m k : ℕ
rs1 : S.destruct.Results o m
rs2_1 : (destruct_join.aux o).Results a k
en : n = k + m
p : Option (WSeq β × WSeq (WSeq β))
mT_1 : p ∈ T.destruct
rop : LiftRelO (LiftRel R) (LiftRel (LiftRel R)) o p
s : WSeq α
S' : WSeq (WSeq α)
t : WSeq β
T' : WSeq (WSeq β)
st : LiftRel R s t
ST' : LiftRel (LiftRel R) S' T'
h : S.destruct.Results (some (s, S')) m
rs2 : (destruct_join.aux (some (s, S'))).Results a k
mT : some (t, T') ∈ T.destruct
⊢ ∃ b ∈ T.join.destruct, LiftRelO R U a b
have rs2₁ : (s.destruct.bind (destruct_append.aux S'.join)).think.Results a k
Tactic: simp only [destruct_join.aux, destruct_append] at rs2
Cleared hypotheses: rs2
-- Lean 4 proof step from Mathlib.Data.WSeq.Relation (hypothesis)
Goal:
α : Type u
β : Type v
R : α → β → Prop
U : WSeq α → WSeq β → Prop
HU :
  ∀ (s1 : WSeq α) (s2 : WSeq β),
    (∃ (s : WSeq α) (t : WSeq β) (S : WSeq (WSeq α)) (T : WSeq (WSeq β)),
        s1 = s.append S.join ∧ s2 = t.append T.join ∧ LiftRel R s t ∧ LiftRel (LiftRel R) S T) →
      U s1 s2
n : ℕ
IH :
  ∀ m < n,
    ∀ {S : WSeq (WSeq α)} {T : WSeq (WSeq β)} (ST : LiftRel (LiftRel R) S T) {a : Option (α × WSeq α)}
      (h : S.join.destruct.Results a m), ∃ b ∈ T.join.destruct, LiftRelO R U a b
S : WSeq (WSeq α)
T : WSeq (WSeq β)
ST : LiftRel (LiftRel R) S T
a : Option (α × WSeq α)
ra : (S.destruct.bind destruct_join.aux).Results a n
o : Option (WSeq α × WSeq (WSeq α))
m k : ℕ
rs1 : S.destruct.Results o m
rs2_1 : (destruct_join.aux o).Results a k
en : n = k + m
p : Option (WSeq β × WSeq (WSeq β))
mT_1 : p ∈ T.destruct
rop : LiftRelO (LiftRel R) (LiftRel (LiftRel R)) o p
s : WSeq α
S' : WSeq (WSeq α)
t : WSeq β
T' : WSeq (WSeq β)
st : LiftRel R s t
ST' : LiftRel (LiftRel R) S' T'
h : S.destruct.Results (some (s, S')) m
rs2 : (destruct_join.aux (some (s, S'))).Results a k
mT : some (t, T') ∈ T.destruct
⊢ ∃ b ∈ T.join.destruct, LiftRelO R U a b
have rs2₁ : (s.destruct.bind (destruct_append.aux S'.join)).think.Results a k
Tactic: simp? [destruct_append] at rs2 says simp only [destruct_join.aux, destruct_append] at rs2
Cleared hypotheses: rs2
-- Lean 4 proof step from Mathlib.Data.WSeq.Relation (goal)
Goal:
α : Type u
β : Type v
R : α → β → Prop
U : WSeq α → WSeq β → Prop
HU :
  ∀ (s1 : WSeq α) (s2 : WSeq β),
    (∃ (s : WSeq α) (t : WSeq β) (S : WSeq (WSeq α)) (T : WSeq (WSeq β)),
        s1 = s.append S.join ∧ s2 = t.append T.join ∧ LiftRel R s t ∧ LiftRel (LiftRel R) S T) →
      U s1 s2
n : ℕ
IH :
  ∀ m < n,
    ∀ {S : WSeq (WSeq α)} {T : WSeq (WSeq β)} (ST : LiftRel (LiftRel R) S T) {a : Option (α × WSeq α)}
      (h : S.join.destruct.Results a m), ∃ b ∈ T.join.destruct, LiftRelO R U a b
S : WSeq (WSeq α)
T : WSeq (WSeq β)
ST : LiftRel (LiftRel R) S T
a : Option (α × WSeq α)
ra : (S.destruct.bind destruct_join.aux).Results a n
o : Option (WSeq α × WSeq (WSeq α))
m k : ℕ
rs1 : S.destruct.Results o m
rs2_1 : (destruct_join.aux o).Results a k
en : n = k + m
p : Option (WSeq β × WSeq (WSeq β))
mT_1 : p ∈ T.destruct
rop : LiftRelO (LiftRel R) (LiftRel (LiftRel R)) o p
s : WSeq α
S' : WSeq (WSeq α)
t : WSeq β
T' : WSeq (WSeq β)
st : LiftRel R s t
ST' : LiftRel (LiftRel R) S' T'
h : S.destruct.Results (some (s, S')) m
mT : some (t, T') ∈ T.destruct
rs2 : (s.destruct.bind (destruct_append.aux S'.join)).think.Results a k
k1 : ℕ
rs3 : (s.destruct.bind (destruct_append.aux S'.join)).Results a k1
ek : k = k1 + 1
o' : Option (α × WSeq α)
m1 n1 : ℕ
rs4 : s.destruct.Results o' m1
rs5 : (destruct_append.aux S'.join o').Results a n1
ek1 : k1 = n1 + m1
p' : Option (β × WSeq β)
mt_1 : p' ∈ t.destruct
rop' : LiftRelO R (LiftRel R) o' p'
h_1 : LiftRelO R (LiftRel R) none none
h_2 : s.destruct.Results none m1
rs5' : (destruct_append.aux S'.join none).Results a n1
mt : none ∈ t.destruct
⊢ n1 < n
have rw : n1 < n1 + m1 + 1 + m
Tactic: rw [en, ek, ek1]