Theorem: Queue.merge_mem₂
Proof state before:
case inr
ε : Type
inst✝ : EventType ε
bound : Time
event : ε
queue₁ queue₂ : Queue ε bound
h : event ∈ queue₂
h✝ : ¬isEmpty queue₁ = true
⊢ event ∈
    if isEmpty queue₂ = true then queue₁
    else
      {
        events :=
          merge.mergeImmediate (Array.split queue₁.events fun x => decide (time x = bound)).fst
              (Array.split queue₂.events fun x => decide (time x = bound)).fst ++
            merge.mergeFuture (Array.split queue₁.events fun x => decide (time x = bound)).snd
              (Array.split queue₂.events fun x => decide (time x = bound)).snd,
        sorted :=
          (_ :
            Sorted
              (merge.mergeImmediate (Array.split queue₁.events fun x => decide (time x = bound)).fst
                    (Array.split queue₂.events fun x => decide (time x = bound)).fst ++
                  merge.mergeFuture (Array.split queue₁.events fun x => decide (time x = bound)).snd
                    (Array.split queue₂.events fun x => decide (time x = bound)).snd).data),
        bounded :=
          (_ :
            ∀ {event : ε},
              (merge.mergeImmediate (Array.split queue₁.events fun x => decide (time x = bound)).fst
                        (Array.split queue₂.events fun x => decide (time x = bound)).fst ++
                      merge.mergeFuture (Array.split queue₁.events fun x => decide (time x = bound)).snd
                        (Array.split queue₂.events fun x => decide (time x = bound)).snd)[0]? =
                  some event →
                bound ≤ time event) }
Tactic:
split
Proof state after:
case inr.inl
ε : Type
inst✝ : EventType ε
bound : Time
event : ε
queue₁ queue₂ : Queue ε bound
h : event ∈ queue₂
h✝¹ : ¬isEmpty queue₁ = true
h✝ : isEmpty queue₂ = true
⊢ event ∈ queue₁

case inr.inr
ε : Type
inst✝ : EventType ε
bound : Time
event : ε
queue₁ queue₂ : Queue ε bound
h : event ∈ queue₂
h✝¹ : ¬isEmpty queue₁ = true
h✝ : ¬isEmpty queue₂ = true
⊢ event ∈
    {
      events :=
        merge.mergeImmediate (Array.split queue₁.events fun x => decide (time x = bound)).fst
            (Array.split queue₂.events fun x => decide (time x = bound)).fst ++
          merge.mergeFuture (Array.split queue₁.events fun x => decide (time x = bound)).snd
            (Array.split queue₂.events fun x => decide (time x = bound)).snd,
      sorted :=
        (_ :
          Sorted
            (merge.mergeImmediate (Array.split queue₁.events fun x => decide (time x = bound)).fst
                  (Array.split queue₂.events fun x => decide (time x = bound)).fst ++
                merge.mergeFuture (Array.split queue₁.events fun x => decide (time x = bound)).snd
                  (Array.split queue₂.events fun x => decide (time x = bound)).snd).data),
      bounded :=
        (_ :
          ∀ {event : ε},
            (merge.mergeImmediate (Array.split queue₁.events fun x => decide (time x = bound)).fst
                      (Array.split queue₂.events fun x => decide (time x = bound)).fst ++
                    merge.mergeFuture (Array.split queue₁.events fun x => decide (time x = bound)).snd
                      (Array.split queue₂.events fun x => decide (time x = bound)).snd)[0]? =
                some event →
              bound ≤ time event) }