--> I) Base case open INV red inv1(init) . close --> II) Induction case --> 1) send1(s) open ISTEP -- arbitrary values -- assumptions -- successor state eq s' = send1(s) . -- check red istep1 . close --> 2) rec1(s) --> c-rec1(s), bit1(s) = b open ISTEP -- arbitrary values op b : -> Bool . -- assumptions -- eq c-rec1(s) = true . eq cell2(s) = c(b) . -- eq bit1(s) = b . -- successor state eq s' = rec1(s) . -- check red istep1 . close --> c-rec1(s), ~(bit1(s) = b), bit2(s) = b open ISTEP -- arbitrary values op b : -> Bool . -- assumptions -- eq c-rec1(s) = true . eq cell2(s) = c(b) . -- eq (bit1(s) = b) = false . eq bit2(s) = b . -- successor state eq s' = rec1(s) . -- check red eqbool-lemma2(bit1(s),b) implies istep1 . close --> c-rec1(s), ~(bit1(s) = b), ~(bit2(s) = b) open ISTEP -- arbitrary values op b : -> Bool . -- assumptions -- eq c-rec1(s) = true . eq cell2(s) = c(b) . -- eq (bit1(s) = b) = false . eq (bit2(s) = b) = false . -- successor state eq s' = rec1(s) . -- check red inv2(s) implies istep1 . close --> ~c-rec1(s) open ISTEP -- arbitrary values -- assumptions eq c-rec1(s) = false . -- successor state eq s' = rec1(s) . -- check red istep1 . close --> 3) send2(s) open ISTEP -- arbitrary values -- assumptions -- successor state eq s' = send2(s) . -- check red istep1 . close --> 4) rec2(s) --> c-rec2(s), bit2(s) = fst(p), bit1(s) = fst(p), --> pac(next(s)) = snd(p) open ISTEP -- arbitrary values op p : -> BPPair . -- assumptions -- eq c-rec2(s) = true . eq cell1(s) = c(p) . -- eq bit2(s) = fst(p) . eq bit1(s) = fst(p) . eq pac(next(s)) = snd(p) . -- successor state eq s' = rec2(s) . -- check red eqbool-lemma1(fst(p)) implies istep1 . close --> c-rec2(s), bit2(s) = fst(p), bit1(s) = fst(p), --> ~(pac(next(s)) = snd(p)) open ISTEP -- arbitrary values op p : -> BPPair . -- assumptions -- eq c-rec2(s) = true . eq cell1(s) = c(p) . -- eq bit2(s) = fst(p) . eq bit1(s) = fst(p) . eq (pac(next(s)) = snd(p)) = false . -- successor state eq s' = rec2(s) . -- check red inv3(s) implies istep1 . close --> c-rec2(s), bit2(s) = fst(p), ~(bit1(s) = fst(p)) open ISTEP -- arbitrary values op p : -> BPPair . -- assumptions -- eq c-rec2(s) = true . eq cell1(s) = c(p) . -- eq bit2(s) = fst(p) . eq (bit1(s) = fst(p)) = false . -- successor state eq s' = rec2(s) . -- check red inv4(s) implies istep1 . close --> c-rec2(s), ~(bit2(s) = fst(p)) open ISTEP -- arbitrary values op p : -> BPPair . -- assumptions -- eq c-rec2(s) = true . eq cell1(s) = c(p) . -- eq (bit2(s) = fst(p)) = false . -- successor state eq s' = rec2(s) . -- check red istep1 . close --> ~c-rec2(s) open ISTEP -- arbitrary values -- assumptions eq c-rec2(s) = false . -- successor state eq s' = rec2(s) . -- check red istep1 . close --> 5) drop1(s) --> c-drop1(s) open ISTEP -- arbitrary values op p : -> BPPair . -- assumptions -- eq c-drop1(s) = true . eq cell1(s) = c(p) . -- successor state eq s' = drop1(s) . -- check red istep1 . close --> ~c-drop1(s) open ISTEP -- arbitrary values -- assumptions eq c-drop1(s) = false . -- successor state eq s' = drop1(s) . -- check red istep1 . close --> 6) drop2(s) --> c-drop2(s) open ISTEP -- arbitrary values op b : -> Bool . -- assumptions -- eq c-drop2(s) = true . eq cell2(s) = c(b) . -- successor state eq s' = drop2(s) . -- check red istep1 . close --> ~c-drop2(s) open ISTEP -- arbitrary values -- assumptions eq c-drop2(s) = false . -- successor state eq s' = drop2(s) . -- check red istep1 . close --> Q.E.D.