case bisim
α : Type u
β : Type v
γ : Type w
S T : Seq (Seq1 α)
⊢ IsBisimulation fun s1 s2 => ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))

case r
α : Type u
β : Type v
γ : Type w
S T : Seq (Seq1 α)
⊢ ∃ s S_1 T_1,
    join (append S T) = append s (join (append S_1 T_1)) ∧
      append (join S) (join T) = append s (append (join S_1) (join T_1))
α : Type u
β : Type v
γ : Type w
S T : Seq (Seq1 α)
⊢ join (append S T) = append (join S) (join T)
apply
  eq_of_bisim fun s1 s2 =>
    ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
case bisim
α : Type u
β : Type v
γ : Type w
S T : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
⊢ BisimO (fun s1 s2 => ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T)))
    (destruct s1) (destruct s2)
case bisim
α : Type u
β : Type v
γ : Type w
S T : Seq (Seq1 α)
⊢ IsBisimulation fun s1 s2 => ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
intro s1 s2 h
case h1
α : Type u
β : Type v
γ : Type w
S✝ T✝ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s : Seq α
S T : Seq (Seq1 α)
⊢ match destruct (join (append S T)), destruct (append (join S) (join T)) with
  | none, none => True
  | some (a, s), some (a', s') =>
    a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))
  | x, x_1 => False

case h2
α : Type u
β : Type v
γ : Type w
S✝ T✝ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s : Seq α
S T : Seq (Seq1 α)
⊢ α →
    ∀ (s : Seq α),
      ∃ s_1 S_1 T_1,
        append s (join (append S T)) = append s_1 (join (append S_1 T_1)) ∧
          append s (append (join S) (join T)) = append s_1 (append (join S_1) (join T_1))
α : Type u
β : Type v
γ : Type w
S✝ T✝ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s : Seq α
S T : Seq (Seq1 α)
⊢ BisimO (fun s1 s2 => ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T)))
    (destruct (append s (join (append S T)))) (destruct (append s (append (join S) (join T))))
apply recOn s <;> simp
case h1.h1
α : Type u
β : Type v
γ : Type w
S✝ T✝ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s : Seq α
S T : Seq (Seq1 α)
⊢ match destruct (join T), destruct (join T) with
  | none, none => True
  | some (a, s), some (a', s') =>
    a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))
  | x, x_1 => False

case h1.h2
α : Type u
β : Type v
γ : Type w
S✝ T✝ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s : Seq α
S T : Seq (Seq1 α)
⊢ ∀ (x : Seq1 α) (s : Seq (Seq1 α)),
    match destruct (join (cons x (append s T))), destruct (append (join (cons x s)) (join T)) with
    | none, none => True
    | some (a, s), some (a', s') =>
      a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))
    | x, x_1 => False
case h1
α : Type u
β : Type v
γ : Type w
S✝ T✝ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s : Seq α
S T : Seq (Seq1 α)
⊢ match destruct (join (append S T)), destruct (append (join S) (join T)) with
  | none, none => True
  | some (a, s), some (a', s') =>
    a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))
  | x, x_1 => False
apply recOn S <;> simp
case h1.h1.h1
α : Type u
β : Type v
γ : Type w
S✝ T✝ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s : Seq α
S T : Seq (Seq1 α)
⊢ match destruct (join nil), destruct (join nil) with
  | none, none => True
  | some (a, s), some (a', s') =>
    a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))
  | x, x_1 => False

case h1.h1.h2
α : Type u
β : Type v
γ : Type w
S✝ T✝ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s : Seq α
S T : Seq (Seq1 α)
⊢ ∀ (x : Seq1 α) (s : Seq (Seq1 α)),
    match destruct (join (cons x s)), destruct (join (cons x s)) with
    | none, none => True
    | some (a, s), some (a', s') =>
      a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))
    | x, x_1 => False
case h1.h1
α : Type u
β : Type v
γ : Type w
S✝ T✝ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s : Seq α
S T : Seq (Seq1 α)
⊢ match destruct (join T), destruct (join T) with
  | none, none => True
  | some (a, s), some (a', s') =>
    a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))
  | x, x_1 => False
apply recOn T
no goals
case h1.h1.h1
α : Type u
β : Type v
γ : Type w
S✝ T✝ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s : Seq α
S T : Seq (Seq1 α)
⊢ match destruct (join nil), destruct (join nil) with
  | none, none => True
  | some (a, s), some (a', s') =>
    a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))
  | x, x_1 => False
simp
case h1.h1.h2
α : Type u
β : Type v
γ : Type w
S✝ T✝¹ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s✝ : Seq α
S T✝ : Seq (Seq1 α)
s : Seq1 α
T : Seq (Seq1 α)
⊢ match destruct (join (cons s T)), destruct (join (cons s T)) with
  | none, none => True
  | some (a, s), some (a', s') =>
    a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))
  | x, x_1 => False
case h1.h1.h2
α : Type u
β : Type v
γ : Type w
S✝ T✝ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s : Seq α
S T : Seq (Seq1 α)
⊢ ∀ (x : Seq1 α) (s : Seq (Seq1 α)),
    match destruct (join (cons x s)), destruct (join (cons x s)) with
    | none, none => True
    | some (a, s), some (a', s') =>
      a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))
    | x, x_1 => False
intro s T
case h1.h1.h2.mk
α : Type u
β : Type v
γ : Type w
S✝ T✝¹ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s✝ : Seq α
S T✝ T : Seq (Seq1 α)
a : α
s : Seq α
⊢ match destruct (join (cons (a, s) T)), destruct (join (cons (a, s) T)) with
  | none, none => True
  | some (a, s), some (a', s') =>
    a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))
  | x, x_1 => False
case h1.h1.h2
α : Type u
β : Type v
γ : Type w
S✝ T✝¹ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s✝ : Seq α
S T✝ : Seq (Seq1 α)
s : Seq1 α
T : Seq (Seq1 α)
⊢ match destruct (join (cons s T)), destruct (join (cons s T)) with
  | none, none => True
  | some (a, s), some (a', s') =>
    a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))
  | x, x_1 => False
cases' s with a s
case h1.h1.h2.mk
α : Type u
β : Type v
γ : Type w
S✝ T✝¹ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s✝ : Seq α
S T✝ T : Seq (Seq1 α)
a : α
s : Seq α
⊢ ∃ s_1 S T_1,
    append s (join T) = append s_1 (join (append S T_1)) ∧ append s (join T) = append s_1 (append (join S) (join T_1))
case h1.h1.h2.mk
α : Type u
β : Type v
γ : Type w
S✝ T✝¹ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s✝ : Seq α
S T✝ T : Seq (Seq1 α)
a : α
s : Seq α
⊢ match destruct (join (cons (a, s) T)), destruct (join (cons (a, s) T)) with
  | none, none => True
  | some (a, s), some (a', s') =>
    a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))
  | x, x_1 => False
simp
no goals
case h1.h1.h2.mk
α : Type u
β : Type v
γ : Type w
S✝ T✝¹ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s✝ : Seq α
S T✝ T : Seq (Seq1 α)
a : α
s : Seq α
⊢ ∃ s_1 S T_1,
    append s (join T) = append s_1 (join (append S T_1)) ∧ append s (join T) = append s_1 (append (join S) (join T_1))
refine' ⟨s, nil, T, _, _⟩ <;> simp
case h1.h2
α : Type u
β : Type v
γ : Type w
S✝¹ T✝ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s✝ : Seq α
S✝ T : Seq (Seq1 α)
s : Seq1 α
S : Seq (Seq1 α)
⊢ match destruct (join (cons s (append S T))), destruct (append (join (cons s S)) (join T)) with
  | none, none => True
  | some (a, s), some (a', s') =>
    a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))
  | x, x_1 => False
case h1.h2
α : Type u
β : Type v
γ : Type w
S✝ T✝ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s : Seq α
S T : Seq (Seq1 α)
⊢ ∀ (x : Seq1 α) (s : Seq (Seq1 α)),
    match destruct (join (cons x (append s T))), destruct (append (join (cons x s)) (join T)) with
    | none, none => True
    | some (a, s), some (a', s') =>
      a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))
    | x, x_1 => False
intro s S
case h1.h2.mk
α : Type u
β : Type v
γ : Type w
S✝¹ T✝ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s✝ : Seq α
S✝ T S : Seq (Seq1 α)
a : α
s : Seq α
⊢ match destruct (join (cons (a, s) (append S T))), destruct (append (join (cons (a, s) S)) (join T)) with
  | none, none => True
  | some (a, s), some (a', s') =>
    a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))
  | x, x_1 => False
case h1.h2
α : Type u
β : Type v
γ : Type w
S✝¹ T✝ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s✝ : Seq α
S✝ T : Seq (Seq1 α)
s : Seq1 α
S : Seq (Seq1 α)
⊢ match destruct (join (cons s (append S T))), destruct (append (join (cons s S)) (join T)) with
  | none, none => True
  | some (a, s), some (a', s') =>
    a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))
  | x, x_1 => False
cases' s with a s
case h1.h2.mk
α : Type u
β : Type v
γ : Type w
S✝¹ T✝ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s✝ : Seq α
S✝ T S : Seq (Seq1 α)
a : α
s : Seq α
⊢ ∃ s_1 S_1 T_1,
    append s (join (append S T)) = append s_1 (join (append S_1 T_1)) ∧
      append s (append (join S) (join T)) = append s_1 (append (join S_1) (join T_1))
case h1.h2.mk
α : Type u
β : Type v
γ : Type w
S✝¹ T✝ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s✝ : Seq α
S✝ T S : Seq (Seq1 α)
a : α
s : Seq α
⊢ match destruct (join (cons (a, s) (append S T))), destruct (append (join (cons (a, s) S)) (join T)) with
  | none, none => True
  | some (a, s), some (a', s') =>
    a = a' ∧ ∃ s_1 S T, s = append s_1 (join (append S T)) ∧ s' = append s_1 (append (join S) (join T))
  | x, x_1 => False
simp
no goals
case h1.h2.mk
α : Type u
β : Type v
γ : Type w
S✝¹ T✝ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s✝ : Seq α
S✝ T S : Seq (Seq1 α)
a : α
s : Seq α
⊢ ∃ s_1 S_1 T_1,
    append s (join (append S T)) = append s_1 (join (append S_1 T_1)) ∧
      append s (append (join S) (join T)) = append s_1 (append (join S_1) (join T_1))
exact ⟨s, S, T, rfl, rfl⟩
case h2
α : Type u
β : Type v
γ : Type w
S✝ T✝ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s✝ : Seq α
S T : Seq (Seq1 α)
x✝ : α
s : Seq α
⊢ ∃ s_1 S_1 T_1,
    append s (join (append S T)) = append s_1 (join (append S_1 T_1)) ∧
      append s (append (join S) (join T)) = append s_1 (append (join S_1) (join T_1))
case h2
α : Type u
β : Type v
γ : Type w
S✝ T✝ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s : Seq α
S T : Seq (Seq1 α)
⊢ α →
    ∀ (s : Seq α),
      ∃ s_1 S_1 T_1,
        append s (join (append S T)) = append s_1 (join (append S_1 T_1)) ∧
          append s (append (join S) (join T)) = append s_1 (append (join S_1) (join T_1))
intro _ s
no goals
case h2
α : Type u
β : Type v
γ : Type w
S✝ T✝ : Seq (Seq1 α)
s1 s2 : Seq α
h : ∃ s S T, s1 = append s (join (append S T)) ∧ s2 = append s (append (join S) (join T))
s✝ : Seq α
S T : Seq (Seq1 α)
x✝ : α
s : Seq α
⊢ ∃ s_1 S_1 T_1,
    append s (join (append S T)) = append s_1 (join (append S_1 T_1)) ∧
      append s (append (join S) (join T)) = append s_1 (append (join S_1) (join T_1))
exact ⟨s, S, T, rfl, rfl⟩
no goals
case r
α : Type u
β : Type v
γ : Type w
S T : Seq (Seq1 α)
⊢ ∃ s S_1 T_1,
    join (append S T) = append s (join (append S_1 T_1)) ∧
      append (join S) (join T) = append s (append (join S_1) (join T_1))
refine' ⟨nil, S, T, _, _⟩ <;> simp